@@ -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 = ''
}
@@ -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,6 +1,6 @@
export function handleTextDirective(el, output, expression) {
- if (output === undefined && String(expression).match(/\./)) {
+ if (output === undefined && expression.match(/\./)) {
output = ''