Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jin-yufeng authored and ZakaryCode committed Jan 29, 2021
1 parent 84bf337 commit 92a4d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-h5/src/api/scroll/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const FRAME_DURATION = 17
export const pageScrollTo = ({ scrollTop, selector, duration = 300, success, fail, complete }) => {
return new Promise((resolve, reject) => {
try {
if (!scrollTop && !selector) {
if (scrollTop === undefined && !selector) {
throw Error('"scrollTop" 或 "selector" 需要其之一')
}

Expand Down

0 comments on commit 92a4d75

Please sign in to comment.