Skip to content

Commit c49e0a5

Browse files
Sherry-huePupilTong
authored andcommitted
fix(web): fix: && use getter to get.
1 parent ead12c9 commit c49e0a5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/short-taxis-smash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@lynx-js/web-core": patch
3+
---
4+
5+
fix: `onNativeModulesCall` && `onNapiModulesCall` use getter to get.

packages/web-platform/web-core/src/apis/LynxView.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,16 @@ export class LynxView extends HTMLElement {
445445
nativeModulesCall: (
446446
...args: [name: string, data: any, moduleName: string]
447447
) => {
448-
if (this.#onNativeModulesCall) {
449-
return this.#onNativeModulesCall(...args);
448+
if (this.onNativeModulesCall) {
449+
return this.onNativeModulesCall(...args);
450450
} else {
451451
return new Promise(resolve => {
452452
this.#cachedNativeModulesCall.push({ args, resolve });
453453
});
454454
}
455455
},
456456
napiModulesCall: (...args) => {
457-
return this.#onNapiModulesCall?.(...args);
457+
return this.onNapiModulesCall?.(...args);
458458
},
459459
onError: (error: Error, release: string, fileName: string) => {
460460
this.dispatchEvent(

0 commit comments

Comments
 (0)