From 75add41002db8be9ea1f9dcf8553a343bf92a43d Mon Sep 17 00:00:00 2001 From: PP Date: Mon, 31 Jul 2023 11:33:59 +0800 Subject: [PATCH] fix: asm.js subpackage without spine module (#15822) # Conflicts: # pal/wasm/wasm-minigame.ts --- pal/wasm/wasm-minigame.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pal/wasm/wasm-minigame.ts b/pal/wasm/wasm-minigame.ts index a7527f1523..cd5e2c88f0 100644 --- a/pal/wasm/wasm-minigame.ts +++ b/pal/wasm/wasm-minigame.ts @@ -26,6 +26,7 @@ import { HUAWEI, TAOBAO_MINIGAME, WASM_SUBPACKAGE, XIAOMI } from 'internal:const import { minigame } from 'pal/minigame'; import { basename } from '../../cocos/core/utils/path'; import { checkPalIntegrity, withImpl } from '../integrity-check'; +import { log } from '../../cocos/core/platform/debug'; export function instantiateWasm (wasmUrl: string, importObject: WebAssembly.Imports): Promise { return getPlatformBinaryUrl(wasmUrl).then((url) => WebAssembly.instantiate(url, importObject)); @@ -55,7 +56,8 @@ function loadSubpackage (name: string): Promise { resolve(); }, fail (err) { - reject(err); + log(`Load subpacakge '${name}' failed, maybe we don't need this subpacakge or it's an engine build issue, for detailed: `, err); + resolve(); }, }); } else {