Procházet zdrojové kódy

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

GeoDaoyu před 3 týdny
rodič
revize
c50e77a755
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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'