Skip to content

Commit 5c2507a

Browse files
author
Guillaume Chau
committed
fix: crash if no throttleOptions, closes #163
1 parent e6ad774 commit 5c2507a

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
@@ -30,7 +30,7 @@ class VisibilityState {
3030
}
3131
// Throttle
3232
if (this.callback && this.options.throttle) {
33-
const { leading } = this.options.throttleOptions
33+
const { leading } = this.options.throttleOptions || {}
3434
this.callback = throttle(this.callback, this.options.throttle, {
3535
leading: (state) => {
3636
return leading === 'both' || (leading === 'visible' && state) || (leading === 'hidden' && !state)

0 commit comments

Comments
 (0)