Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #504 from ReedSun/bug-fix
Browse files Browse the repository at this point in the history
[+] wxc-pan-item: add judgment before using element
  • Loading branch information
tw93 authored Oct 26, 2020
2 parents 06a5fe0 + 18aa5f6 commit ff05432
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/wxc-pan-item/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ under the License.
setTimeout(() => {
if (this.supportAndroid && this.needSlider) {
const element = this.$refs['wxc-pan-item'];
Binding.prepare && Binding.prepare({
anchor: element.ref,
eventType: 'pan'
});
if (element) {
Binding.prepare && Binding.prepare({
anchor: element.ref,
eventType: 'pan'
});
}
}
}, 300)
},
Expand Down

0 comments on commit ff05432

Please sign in to comment.