Skip to content

Commit 3089e80

Browse files
Scope item to the loop only
The item variable is used only in the loop, so don't make it a global.
1 parent 467750f commit 3089e80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

share/static/js/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ document.addEventListener('htmx:beforeCleanupElement', function(evt) {
9191
{ selector: '[data-bs-toggle="dropdown"]', component: 'Dropdown' },
9292
{ selector: '.modal', component: 'Modal' },
9393
];
94-
for ( item of toggles ) {
94+
for ( const item of toggles ) {
9595
if (elt.matches(item.selector)) {
9696
const instance = bootstrap[item.component].getInstance(elt);
9797
if (instance) {

0 commit comments

Comments
 (0)