Skip to content

Commit

Permalink
fix: bug in throttleFilter (vitest-dev#690)
Browse files Browse the repository at this point in the history
Co-authored-by: hslee-witi <hs.lee@witi.co.kr>
  • Loading branch information
rhdehf1030 and hslee-witi committed Aug 23, 2021
1 parent 70ecd2c commit b465d89
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/shared/utils/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export function throttleFilter(ms: MaybeRef<number>, trailing = true) {
}
else if (trailing) {
timer = setTimeout(() => {
lastExec = Date.now()
clear()
invoke()
}, duration)
Expand Down

0 comments on commit b465d89

Please sign in to comment.