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:
Frank Rehwinkel committed 2017-05-04 16:01:53 -04:00
1 parent d0cd976246
commit 54477b8b8f
1 file changed
+1 -1
+1 -1
View File
@@ -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;