Skip to content

Commit

Permalink
fix: support threshold option not being a number
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Dec 28, 2020
1 parent 3603805 commit 617b650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directives/observe-visibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class VisibilityState {
}

get threshold () {
return (this.options.intersection && this.options.intersection.threshold) || 0
return this.options.intersection && typeof this.options.intersection.threshold === 'number' ? this.options.intersection.threshold : 0
}

createObserver (options, vnode) {
Expand Down

0 comments on commit 617b650

Please sign in to comment.