Skip to content

Commit eeeb6c3

Browse files
committed
This stops Phaser progressing with file loads when an audio file file
failed in IE. The problem was that it was calling fileComplete everytime instead of setting it as a callback.
1 parent 173786c commit eeeb6c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/loader/Loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ Phaser.Loader.prototype = {
12571257
};
12581258
file.data.preload = 'auto';
12591259
file.data.src = this.baseURL + file.url;
1260-
file.data.addEventListener('canplaythrough', Phaser.GAMES[this.game.id].load.fileComplete(this._fileIndex), false);
1260+
file.data.addEventListener('canplaythrough', function () { Phaser.GAMES[_this.game.id].load.fileComplete(_this._fileIndex); }, false);
12611261
file.data.load();
12621262
}
12631263
}

0 commit comments

Comments
 (0)