Skip to content

Commit 617b650

Browse files
committed
fix: support threshold option not being a number
1 parent 3603805 commit 617b650

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/directives/observe-visibility.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class VisibilityState {
99
}
1010

1111
get threshold () {
12-
return (this.options.intersection && this.options.intersection.threshold) || 0
12+
return this.options.intersection && typeof this.options.intersection.threshold === 'number' ? this.options.intersection.threshold : 0
1313
}
1414

1515
createObserver (options, vnode) {

0 commit comments

Comments
 (0)