瀏覽代碼

style: use let instead of var in x-model.js (#4645)

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

+ 1 - 1
packages/alpinejs/src/directives/x-model.js

@@ -57,7 +57,7 @@ directive('model', (el, { modifiers, expression }, { effect, cleanup }) => {
 
     // If the element we are binding to is a select, a radio, or checkbox
     // we'll listen for the change event instead of the "input" event.
-    var event = (el.tagName.toLowerCase() === 'select')
+    let event = (el.tagName.toLowerCase() === 'select')
         || ['checkbox', 'radio'].includes(el.type)
         || modifiers.includes('lazy')
             ? 'change' : 'input'