Explorar o código

remove fix to fail the test

Kevin Batdorf %!s(int64=4) %!d(string=hai) anos
pai
achega
64402fa67d
Modificáronse 3 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      src/directives/bind.js
  2. 1 1
      src/directives/for.js
  3. 1 1
      src/directives/text.js

+ 1 - 1
src/directives/bind.js

@@ -8,7 +8,7 @@ export function handleAttributeBindingDirective(component, el, attrName, express
         if (Alpine.ignoreFocusedForValueBinding && document.activeElement.isSameNode(el)) return
 
         // If nested model key is undefined, set the default value to empty string.
-        if (value === undefined && String(expression).match(/\./)) {
+        if (value === undefined && expression.match(/\./)) {
             value = ''
         }
 

+ 1 - 1
src/directives/for.js

@@ -46,7 +46,7 @@ function parseForExpression(expression) {
     let forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/
     let stripParensRE = /^\(|\)$/g
     let forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/
-    let inMatch = String(expression).match(forAliasRE)
+    let inMatch = expression.match(forAliasRE)
     if (! inMatch) return
     let res = {}
     res.items = inMatch[2].trim()

+ 1 - 1
src/directives/text.js

@@ -1,6 +1,6 @@
 export function handleTextDirective(el, output, expression) {
     // If nested model key is undefined, set the default value to empty string.
-    if (output === undefined && String(expression).match(/\./)) {
+    if (output === undefined && expression.match(/\./)) {
         output = ''
     }