summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/post.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/post.js b/src/js/post.js
index c4df41865..4377ed797 100644
--- a/src/js/post.js
+++ b/src/js/post.js
@@ -91,7 +91,7 @@ function integrateWasmJS(Module) {
// TODO: avoid this copy, by avoiding such static init writes
// TODO: in shorter term, just copy up to the last static init write
var oldBuffer = Module['buffer'];
- var newBuffer = ArrayBuffer(oldBuffer.byteLength);
+ var newBuffer = new ArrayBuffer(oldBuffer.byteLength);
(new Int8Array(newBuffer)).set(new Int8Array(oldBuffer));
updateGlobalBuffer(newBuffer);
updateGlobalBufferViews();