Skip to content

Commit

Permalink
fix: findRef
Browse files Browse the repository at this point in the history
  • Loading branch information
helsonxiao committed Sep 14, 2020
1 parent d16d30f commit 0322091
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/taro-h5/src/api/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ function processOpenapi (apiName, defaultOptions, formatResult = res => res, for
}
}

const findRef = (refId, componentInstance) => {
const findRef = (refId, componentInstance = {}) => {
if (componentInstance.isRoute) return
return componentInstance[refId] || findRef(refId, componentInstance.vnode._owner)
return componentInstance[refId] || findRef(refId, componentInstance.vnode._owner) || document.getElementById(refId).childNodes[0]
}

/**
Expand Down

0 comments on commit 0322091

Please sign in to comment.