Skip to content

Commit

Permalink
fix: 修复核心全量后已知 bugs (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
yenshih authored and Ricardo-Li committed Mar 14, 2019
1 parent 52d7aa4 commit 1235c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/mip/src/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class Runtime {
let pageMetaConfirmed = false
try {
pageMeta = JSON.parse(window.name)
if (typeof pageMeta !== 'object' || pageMeta === null) {
throw new Error()
}
/* istanbul ignore next */
pageMetaConfirmed = true
} catch (e) {
Expand Down
3 changes: 1 addition & 2 deletions packages/mip/src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ let viewer = {
this.fixedElement = fixedElement
fixedElement.init()

// proxy <a mip-link>
setTimeout(() => this._proxyLink(this.page), 0)
isMIPShellDisabled() || setTimeout(() => this._proxyLink(this.page))
},

/**
Expand Down

0 comments on commit 1235c67

Please sign in to comment.