Skip to content

Commit

Permalink
refactor: 불필요한 표현 간략화
Browse files Browse the repository at this point in the history
  • Loading branch information
Xvezda committed Dec 17, 2021
1 parent ad9ec7e commit a88c793
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/vomjs-tools/src/optimize.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ export const debounce = time => {
return callback => {
let id = 0;
const wrapper = (...args) => {
if (id !== 0) {
clearTimeout(id);
}
clearTimeout(id);
id = setTimeout(() => {
callback(...args);
}, time);
Expand Down

0 comments on commit a88c793

Please sign in to comment.