Skip to content

Commit 454019f

Browse files
committed
fix asynchronization conflict
1 parent 10d49c2 commit 454019f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/lrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Lrc {
3939
this.parsed[index] = [['00:00', 'Loading']];
4040
const xhr = new XMLHttpRequest();
4141
xhr.onreadystatechange = () => {
42-
if (xhr.readyState === 4) {
42+
if (index === this.player.playIndex && xhr.readyState === 4) {
4343
if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {
4444
this.parsed[index] = this.parse(xhr.responseText);
4545
}

0 commit comments

Comments
 (0)