Skip to content

Commit 189ee55

Browse files
committed
Remove redundant step in promise change. NFC
This stop in the chain is only need if the offset converter is needed.
1 parent 21f2533 commit 189ee55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/preamble.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,13 +800,13 @@ function instantiateArrayBuffer(binaryFile, imports, receiver) {
800800
savedBinary = binary;
801801
#endif
802802
return WebAssembly.instantiate(binary, imports);
803-
}).then((instance) => {
804803
#if USE_OFFSET_CONVERTER
804+
}).then((instance) => {
805805
// wasmOffsetConverter needs to be assigned before calling the receiver
806806
// (receiveInstantiationResult). See comments below in instantiateAsync.
807807
wasmOffsetConverter = new WasmOffsetConverter(savedBinary, instance.module);
808-
#endif
809808
return instance;
809+
#endif
810810
}).then(receiver, (reason) => {
811811
err(`failed to asynchronously prepare wasm: ${reason}`);
812812

0 commit comments

Comments
 (0)