Skip to content

Commit 5f69269

Browse files
authored
fix: allow passing 0 as duration (#376)
1 parent 48b3599 commit 5f69269

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scrollTo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const scroller = () => {
143143
}
144144

145145
container = _.$(options.container || defaults.container)
146-
duration = options.duration || defaults.duration
146+
duration = options.hasOwnProperty('duration') ? options.duration : defaults.duration
147147
easing = options.easing || defaults.easing
148148
offset = options.hasOwnProperty('offset') ? options.offset : defaults.offset
149149
force = options.hasOwnProperty('force')

0 commit comments

Comments
 (0)