Skip to content

Commit

Permalink
chore(runtime): 调整 lint 错误
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Jul 15, 2020
1 parent 031ca3b commit 2db5b6d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/taro-runtime/src/dsl/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ export function createPageConfig (component: any, pageName?: string, data?: Reco
}

// onShareAppMessage 和 onShareTimeline 一样,会影响小程序右上方按钮的选项,因此不能默认注册。
if (component.onShareAppMessage
|| component.prototype.onShareAppMessage
|| component.enableShareAppMessage) {
if (component.onShareAppMessage ||
component.prototype.onShareAppMessage ||
component.enableShareAppMessage) {
config.onShareAppMessage = function (options) {
const target = options.target
if (target != null) {
Expand All @@ -230,9 +230,9 @@ export function createPageConfig (component: any, pageName?: string, data?: Reco
return safeExecute(path, 'onShareAppMessage', options)
}
}
if (component.onShareTimeline
|| component.prototype.onShareTimeline
|| component.enableShareTimeline) {
if (component.onShareTimeline ||
component.prototype.onShareTimeline ||
component.enableShareTimeline) {
config.onShareTimeline = function () {
const path = getPath(id, this.options)
return safeExecute(path, 'onShareTimeline')
Expand Down

0 comments on commit 2db5b6d

Please sign in to comment.