Skip to content

Commit

Permalink
Don't override existed properties while copying properties from wasm.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Oct 23, 2024
1 parent 84b0b1e commit 7ed71de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cocos/spine/lib/spine-define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ function overrideClass (wasm): void {
spine.wasmUtil.wasm = wasm;
spine.wasmUtil.spineWasmInit();

Object.assign(spine, wasm);
for (const k in wasm) {
const v = wasm[k];
if (!spine[k]) {
spine[k] = v;
}
}
}

function overrideProperty_String (): void {
Expand Down

0 comments on commit 7ed71de

Please sign in to comment.