Skip to content

Commit 6d45e40

Browse files
committed
refactor(hexo_index): remove unused parameter
1 parent 1fcdbda commit 6d45e40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/hexo/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ const createLoadThemeRoute = function(generatorResult, locals, ctx) {
7474
};
7575
};
7676

77-
function debounce(func, wait, immediate) {
77+
function debounce(func, wait) {
7878
let timeout;
7979
return function() {
8080
const context = this;
8181
const args = arguments;
8282
clearTimeout(timeout);
8383
timeout = setTimeout(() => {
8484
timeout = null;
85-
if (!immediate) func.apply(context, args);
85+
func.apply(context, args);
8686
}, wait);
87-
if (immediate && !timeout) func.apply(context, args);
87+
if (!timeout) func.apply(context, args);
8888
};
8989
}
9090

0 commit comments

Comments
 (0)