瀏覽代碼

style: use let/const instead of var in debounce.js (#4644)

GeoDaoyu 3 周之前
父節點
當前提交
c6db55e89f
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      packages/alpinejs/src/utils/debounce.js

+ 3 - 3
packages/alpinejs/src/utils/debounce.js

@@ -1,11 +1,11 @@
 
 export function debounce(func, wait) {
-    var timeout
+    let timeout
 
     return function() {
-        var context = this, args = arguments
+        const context = this, args = arguments
 
-        var later = function () {
+        const later = function () {
             timeout = null
 
             func.apply(context, args)