Skip to content

Commit

Permalink
fix(uts): add registerUTSInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Apr 24, 2023
1 parent 92f9464 commit 547ab76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ const third = [
'initUTSPackageName',
'requireUTSPlugin',
'registerUTSPlugin',
'registerUTSInterface',
]

const ad = [
Expand Down
4 changes: 4 additions & 0 deletions src/platforms/app-plus/service/api/plugin/uts.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ function resolveSyncResult(res, returnOptions, instanceId, proxy) {
}
if (returnOptions) {
if (returnOptions.type === 'interface' && typeof res.params === 'number') {
// 返回了 0
if (!res.params) {
return null;
}
if (res.params === instanceId && proxy) {
return proxy;
}
Expand Down

0 comments on commit 547ab76

Please sign in to comment.