From 454019fea04dd081dfd3021b27b20ac58148ab26 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Wed, 14 Mar 2018 00:25:54 +0800 Subject: [PATCH] fix asynchronization conflict --- src/js/lrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/lrc.js b/src/js/lrc.js index 48b5310..f4038b2 100644 --- a/src/js/lrc.js +++ b/src/js/lrc.js @@ -39,7 +39,7 @@ class Lrc { this.parsed[index] = [['00:00', 'Loading']]; const xhr = new XMLHttpRequest(); xhr.onreadystatechange = () => { - if (xhr.readyState === 4) { + if (index === this.player.playIndex && xhr.readyState === 4) { if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) { this.parsed[index] = this.parse(xhr.responseText); }