Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyc committed Jul 11, 2024
1 parent 5fa455b commit 0260008
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ ready(() => {
for (const link of document.querySelectorAll('.js-gds-cmp-show')) {
link.addEventListener('click', function (e) {
e.preventDefault();
window.gdCmp.show?.();
window.gdsCmp.show?.();
});
}

// Attach open click listeners to all elements with data-gds-cmp-trigger="show|hide|withdraw"
document.addEventListener('click', function ({target}) {
if (target.matches('[data-gds-cmp-trigger]')) {
const trigger = target.dataset.gdsCmpTrigger;
window.gdCmp[trigger]?.();
window.gdsCmp[trigger]?.();
}
}, {passive: true});
});
Expand Down

0 comments on commit 0260008

Please sign in to comment.