diff --git a/resources/js/components/field-validation/Builder.vue b/resources/js/components/field-validation/Builder.vue index 384f30c8f72..f04f80aff51 100644 --- a/resources/js/components/field-validation/Builder.vue +++ b/resources/js/components/field-validation/Builder.vue @@ -256,8 +256,9 @@ export default { ifSearchNotFoundAddCustom() { let rulesSelect = this.$refs.rulesSelect; - let rule = rulesSelect.searchQuery.value; + let rule = rulesSelect?.searchQuery; + if (!rule) return; if (this.searchNotFound(rulesSelect) || this.hasUnfinishedParameters(rule)) return; this.add(rule); @@ -272,7 +273,7 @@ export default { }, searchNotFound(rulesSelect) { - return rulesSelect.searchQuery.value?.length === 0 || rulesSelect?.filteredOptions.length === 0; + return rulesSelect.filteredOptions.length === 0; }, updated(rules) { diff --git a/resources/js/components/fieldtypes/FormattingLocalesFieldtype.vue b/resources/js/components/fieldtypes/FormattingLocalesFieldtype.vue index d2b77f2f279..ef038c9b35b 100644 --- a/resources/js/components/fieldtypes/FormattingLocalesFieldtype.vue +++ b/resources/js/components/fieldtypes/FormattingLocalesFieldtype.vue @@ -18,8 +18,9 @@ -