diff --git a/package-lock.json b/package-lock.json index a55737093..f7e6e353f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@yext/answers-search-ui", - "version": "1.16.1", + "version": "1.16.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/answers-search-ui", - "version": "1.16.1", + "version": "1.16.2", "license": "BSD-3-Clause", "dependencies": { "@mapbox/mapbox-gl-language": "^0.10.1", diff --git a/package.json b/package.json index d9f0e7271..824110c42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/answers-search-ui", - "version": "1.16.1", + "version": "1.16.2", "description": "Javascript Search Programming Interface", "main": "dist/answers-umd.js", "repository": { diff --git a/src/ui/components/search/autocompletecomponent.js b/src/ui/components/search/autocompletecomponent.js index c01ededfc..326048ceb 100644 --- a/src/ui/components/search/autocompletecomponent.js +++ b/src/ui/components/search/autocompletecomponent.js @@ -214,7 +214,7 @@ export default class AutoCompleteComponent extends Component { resultIndex: this._resultIndex, promptHeader: this._originalQuery.length === 0 ? this.promptHeader : null, listLabelIdName: this.listLabelIdName, - autocompleteContainerIdName: `yxt-AutoComplete-container-${this._config.name.replaceAll('.', '-')}`, + autocompleteContainerIdName: `yxt-AutoComplete-container-${this._config.name?.replace(/\./g, '-') || ''}`, eventOptions: this.eventOptions(data) })); } diff --git a/src/ui/components/search/searchcomponent.js b/src/ui/components/search/searchcomponent.js index 57ee75b52..e3bcef164 100644 --- a/src/ui/components/search/searchcomponent.js +++ b/src/ui/components/search/searchcomponent.js @@ -678,7 +678,7 @@ export default class SearchComponent extends Component { labelText: this.labelText, inputLabelIdName: this.inputLabelIdName, submitIcon: this.submitIcon, - searchBarContainerId: this._container.id, + searchBarContainerId: this._container?.id || '', submitText: this.submitText, clearText: this.clearText, showClearButton: this._showClearButton,