|
@@ -574,7 +574,7 @@
|
|
|
let forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
|
let stripParensRE = /^\(|\)$/g;
|
|
|
let forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
|
- let inMatch = expression.match(forAliasRE);
|
|
|
+ let inMatch = String(expression).match(forAliasRE);
|
|
|
if (!inMatch) return;
|
|
|
let res = {};
|
|
|
res.items = inMatch[2].trim();
|
|
@@ -671,7 +671,7 @@
|
|
|
if (attrName === 'value') {
|
|
|
if (Alpine.ignoreFocusedForValueBinding && document.activeElement.isSameNode(el)) return; // If nested model key is undefined, set the default value to empty string.
|
|
|
|
|
|
- if (value === undefined && expression.match(/\./)) {
|
|
|
+ if (value === undefined && String(expression).match(/\./)) {
|
|
|
value = '';
|
|
|
}
|
|
|
|
|
@@ -754,7 +754,7 @@
|
|
|
|
|
|
function handleTextDirective(el, output, expression) {
|
|
|
// If nested model key is undefined, set the default value to empty string.
|
|
|
- if (output === undefined && expression.match(/\./)) {
|
|
|
+ if (output === undefined && String(expression).match(/\./)) {
|
|
|
output = '';
|
|
|
}
|
|
|
|