Skip to content

Commit

Permalink
Fix CodeQL scanning issues
Browse files Browse the repository at this point in the history
ISSUE: ADPM-70
  • Loading branch information
filipkojic committed Oct 8, 2024
1 parent 63ee734 commit 497fbf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Resources/views/backend/_resources/js/ElementGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ if (!window.AdyenFE) {

const handleOnOptionChange = (listItem, storeId) => {
hiddenInput.value = storeId;
updateTextOnChange && (switchButton.firstElementChild.innerHTML = listItem.innerText);
updateTextOnChange && (switchButton.firstElementChild.textContent = listItem.innerText);
list.classList.remove('adls--show');

listItems.forEach((li) => li.classList.remove('adls--selected'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ if (!window.AdyenFE) {

name += 'Controller';

return AdyenFE[name] ? new AdyenFE[name](configuration) : null;
if(!(AdyenFE.hasOwnProperty(name) && typeof AdyenFE[name] === 'function')) {
return null;
}

return new AdyenFE[name](configuration);
};
}

Expand Down

0 comments on commit 497fbf0

Please sign in to comment.