Skip to content

Commit

Permalink
corrected variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Dębiński committed Mar 19, 2024
1 parent b73d5ca commit 16589e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/bundle/Resources/public/js/scripts/core/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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();
}
Expand Down
6 changes: 3 additions & 3 deletions src/bundle/Resources/public/js/scripts/helpers/text.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '&lt;')
.replace(/>/g, '&gt;')
Expand Down

0 comments on commit 16589e6

Please sign in to comment.