ソースを参照

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'