Skip to content

Commit 3725cec

Browse files
jdufresnematthiask
authored andcommitted
Declare local JS variable to avoid leaking to global scope
Without the use of var, handle becomes a global variable. Avoid that by declaring it local.
1 parent ac52b23 commit 3725cec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug_toolbar/static/debug_toolbar/js/toolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
$('#djDebugToolbar li').removeClass('djdt-active');
213213
// finally close toolbar
214214
$('#djDebugToolbar').hide('fast');
215-
handle = $('#djDebugToolbarHandle');
215+
var handle = $('#djDebugToolbarHandle');
216216
handle.show();
217217
// set handle position
218218
var handleTop = djdt.cookie.get('djdttop');

0 commit comments

Comments
 (0)