diff options
-rw-r--r-- | src/preamble.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/preamble.js b/src/preamble.js index fafc485c..7de82dbc 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -897,10 +897,12 @@ function loadMemoryInitializer(filename) { applyData(Module['readBinary'](filename)); } else { // asynchronous - Browser.asyncLoad(filename, function(data) { - applyData(data); - }, function(data) { - throw 'could not load memory initializer ' + filename; + addPreRun(function() { + Browser.asyncLoad(filename, function(data) { + applyData(data); + }, function(data) { + throw 'could not load memory initializer ' + filename; + }); }); } } |