Browse Source

fix error where data was being hoisted to global scope introduced in 3.2.0 (#1665)

Co-authored-by: dand <daniel.dent@borderconnect.com>
Jacob Pozaic 4 years ago
parent
commit
e1db0b2acc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/alpinejs/src/directives/x-data.js

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

@@ -19,7 +19,7 @@ directive('data', skipDuringClone((el, { expression }, { cleanup }) => {
     let dataProviderContext = {}
     injectDataProviders(dataProviderContext, magicContext)
 
-    data = evaluate(el, expression, { scope: dataProviderContext })
+    let data = evaluate(el, expression, { scope: dataProviderContext })
 
     injectMagics(data, el)