Skip to content

Commit

Permalink
修改判空逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcuijuan committed Jun 19, 2024
1 parent 2e20530 commit 756eba0
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/mpx-webview/H5/webviewbridge.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
const hostValidate = this.hostValidate(event.origin)
const data = event.data
// 判断number类型,防止undefined导致触发return逻辑
if (data.clientUid !== 'undefined' && +data.clientUid !== this._uid) {
if (data.clientUid !== undefined && +data.clientUid !== this._uid) {
return
}
let value = data.payload
Expand Down
2 changes: 1 addition & 1 deletion packages/webview-bridge/dist/webviewbridge.esm.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function postMessage (type, data = {}) {
callbackId,
payload: filterData(data)
};
if (clientUid !== 'undefined') {
if (clientUid !== undefined) {
postParams.clientUid = clientUid;
}
window.parent.postMessage && window.parent.postMessage(postParams, '*');
Expand Down
Loading

0 comments on commit 756eba0

Please sign in to comment.