diff --git a/src/bundle/Resources/public/js/scripts/core/dropdown.js b/src/bundle/Resources/public/js/scripts/core/dropdown.js index 74835d74dd..30a12c6446 100644 --- a/src/bundle/Resources/public/js/scripts/core/dropdown.js +++ b/src/bundle/Resources/public/js/scripts/core/dropdown.js @@ -151,8 +151,8 @@ } selectOption(value) { - const clearValue = JSON.stringify(String(value)); - const optionToSelect = this.itemsListContainer.querySelector(`.ibexa-dropdown__item[data-value=${clearValue}]`); + const stringifiedValue = JSON.stringify(String(value)); + const optionToSelect = this.itemsListContainer.querySelector(`.ibexa-dropdown__item[data-value=${stringifiedValue}]`); return this.onSelect(optionToSelect, true); } @@ -387,8 +387,8 @@ } removeOption(value) { - const clearValue = JSON.stringify(String(value)); - const optionNode = this.itemsListContainer.querySelector(`[data-value=${clearValue}]`); + const stringifiedValue = JSON.stringify(String(value)); + const optionNode = this.itemsListContainer.querySelector(`[data-value=${stringifiedValue}]`); optionNode.remove(); } diff --git a/src/bundle/Resources/public/js/scripts/helpers/text.helper.js b/src/bundle/Resources/public/js/scripts/helpers/text.helper.js index b86c7e9250..3fee9c5fc0 100644 --- a/src/bundle/Resources/public/js/scripts/helpers/text.helper.js +++ b/src/bundle/Resources/public/js/scripts/helpers/text.helper.js @@ -7,12 +7,12 @@ return stringTempNode.innerHTML; }; - const escapeHTMLAttribute = (str) => { - if (str === null) { + const escapeHTMLAttribute = (string) => { + if (string === null) { return ''; } - return String(str) + return String(string) .replace(/&/g, '&') .replace(//g, '>')