Fixed #2848 - Dropdown: Cannot read properties of undefined (reading 'replaceAll')

pull/2862/head
mertsincan 2022-08-16 12:04:52 +01:00
parent 77f5e7acd3
commit 6a3f7bf230
5 changed files with 24 additions and 24 deletions

View File

@ -889,16 +889,16 @@ export default {
return ObjectUtils.isNotEmpty(this.visibleOptions) && this.overlayVisible ? this.searchMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptySearchMessageText; return ObjectUtils.isNotEmpty(this.visibleOptions) && this.overlayVisible ? this.searchMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptySearchMessageText;
}, },
searchMessageText() { searchMessageText() {
return this.searchMessage || this.$primevue.config.locale.searchMessage; return this.searchMessage || this.$primevue.config.locale.searchMessage || '';
}, },
emptySearchMessageText() { emptySearchMessageText() {
return this.emptySearchMessage || this.$primevue.config.locale.emptySearchMessage; return this.emptySearchMessage || this.$primevue.config.locale.emptySearchMessage || '';
}, },
selectionMessageText() { selectionMessageText() {
return this.selectionMessage || this.$primevue.config.locale.selectionMessage; return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';
}, },
emptySelectionMessageText() { emptySelectionMessageText() {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage; return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';
}, },
selectedMessageText() { selectedMessageText() {
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText; return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;

View File

@ -732,19 +732,19 @@ export default {
return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.searchMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptySearchMessageText; return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.searchMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptySearchMessageText;
}, },
searchMessageText() { searchMessageText() {
return this.searchMessage || this.$primevue.config.locale.searchMessage; return this.searchMessage || this.$primevue.config.locale.searchMessage || '';
}, },
emptySearchMessageText() { emptySearchMessageText() {
return this.emptySearchMessage || this.$primevue.config.locale.emptySearchMessage; return this.emptySearchMessage || this.$primevue.config.locale.emptySearchMessage || '';
}, },
emptyMessageText() { emptyMessageText() {
return this.emptyMessage || this.$primevue.config.locale.emptyMessage; return this.emptyMessage || this.$primevue.config.locale.emptyMessage || '';
}, },
selectionMessageText() { selectionMessageText() {
return this.selectionMessage || this.$primevue.config.locale.selectionMessage; return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';
}, },
emptySelectionMessageText() { emptySelectionMessageText() {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage; return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';
}, },
selectedMessageText() { selectedMessageText() {
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText; return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;

View File

@ -842,19 +842,19 @@ export default {
return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText; return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText;
}, },
filterMessageText() { filterMessageText() {
return this.filterMessage || this.$primevue.config.locale.searchMessage; return this.filterMessage || this.$primevue.config.locale.searchMessage || '';
}, },
emptyFilterMessageText() { emptyFilterMessageText() {
return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage; return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage || '';
}, },
emptyMessageText() { emptyMessageText() {
return this.emptyMessage || this.$primevue.config.locale.emptyMessage; return this.emptyMessage || this.$primevue.config.locale.emptyMessage || '';
}, },
selectionMessageText() { selectionMessageText() {
return this.selectionMessage || this.$primevue.config.locale.selectionMessage; return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';
}, },
emptySelectionMessageText() { emptySelectionMessageText() {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage; return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';
}, },
selectedMessageText() { selectedMessageText() {
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText; return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;

View File

@ -664,19 +664,19 @@ export default {
return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText; return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText;
}, },
filterMessageText() { filterMessageText() {
return this.filterMessage || this.$primevue.config.locale.searchMessage; return this.filterMessage || this.$primevue.config.locale.searchMessage || '';
}, },
emptyFilterMessageText() { emptyFilterMessageText() {
return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage; return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage || '';
}, },
emptyMessageText() { emptyMessageText() {
return this.emptyMessage || this.$primevue.config.locale.emptyMessage; return this.emptyMessage || this.$primevue.config.locale.emptyMessage || '';
}, },
selectionMessageText() { selectionMessageText() {
return this.selectionMessage || this.$primevue.config.locale.selectionMessage; return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';
}, },
emptySelectionMessageText() { emptySelectionMessageText() {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage; return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';
}, },
selectedMessageText() { selectedMessageText() {
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText; return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;

View File

@ -995,19 +995,19 @@ export default {
return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText; return ObjectUtils.isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText;
}, },
filterMessageText() { filterMessageText() {
return this.filterMessage || this.$primevue.config.locale.searchMessage; return this.filterMessage || this.$primevue.config.locale.searchMessage || '';
}, },
emptyFilterMessageText() { emptyFilterMessageText() {
return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage; return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage || '';
}, },
emptyMessageText() { emptyMessageText() {
return this.emptyMessage || this.$primevue.config.locale.emptyMessage; return this.emptyMessage || this.$primevue.config.locale.emptyMessage || '';
}, },
selectionMessageText() { selectionMessageText() {
return this.selectionMessage || this.$primevue.config.locale.selectionMessage; return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';
}, },
emptySelectionMessageText() { emptySelectionMessageText() {
return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage; return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';
}, },
selectedMessageText() { selectedMessageText() {
return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.modelValue.length) : this.emptySelectionMessageText; return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.modelValue.length) : this.emptySelectionMessageText;