mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-28 01:12:03 +00:00
Make variable local: key
This line of code was introduced years ago with a variable that javascript is happy to add to the global name space. Clearly it was meant as a local variable. Probably a cut and paste error because other places in the code use the same syntax but there the value is a local because the var statement for it appeared elsewhere in the function. Once code like this is cleaned up to use the new 'let' construct, as well as 'use strict', mistakes like this will be much less likely to go uncaught.
This commit is contained in:
1 parent
d0cd976246
commit
54477b8b8f
1 file changed
+1
-1
+1
-1
@@ -322,7 +322,7 @@ function ThemeState(stateNames)
|
||||
var stateNameKeys = [];
|
||||
this._stateNames = {};
|
||||
|
||||
for (key in stateNames)
|
||||
for (var key in stateNames)
|
||||
{
|
||||
if (!stateNames.hasOwnProperty(key))
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user