Skip to content

Commit

Permalink
fixes #2471 XHR onreadystatechange execution order
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymovin committed Feb 27, 2021
1 parent 52994f8 commit 39114ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion player/js/utils/asset_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ var assetLoader = (function () {
// This crashes on Android WebView prior to KitKat
xhr.responseType = 'json';
} catch (err) {} // eslint-disable-line no-empty
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
Expand All @@ -39,6 +38,7 @@ var assetLoader = (function () {
}
}
};
xhr.send();
}
return {
load: loadAsset,
Expand Down

0 comments on commit 39114ee

Please sign in to comment.