Procházet zdrojové kódy

remove fix to fail the test

Kevin Batdorf před 4 roky
rodič
revize
64402fa67d
3 změnil soubory, kde provedl 3 přidání a 3 odebrání
  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 = ''
     }