diff --git a/src/postamble_minimal.js b/src/postamble_minimal.js index 15f6ffdc4ba9f..e3091c2f73222 100644 --- a/src/postamble_minimal.js +++ b/src/postamble_minimal.js @@ -307,12 +307,16 @@ null; } -#if WASM == 2 +#if WASM == 2 || MODULARIZE , (error) => { #if ASSERTIONS console.error(error); #endif +#if MODULARIZE + readyPromiseReject?.(error); +#endif + #if ENVIRONMENT_MAY_BE_NODE || ENVIRONMENT_MAY_BE_SHELL if (globalThis.location) { #endif @@ -325,7 +329,7 @@ null; } #endif } -#endif // WASM == 2 +#endif // WASM == 2 || MODULARIZE ); #if PTHREADS || WASM_WORKERS