Do not copy variable used only once.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 8 Jul 2017 22:14:15 +0000 (00:14 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 8 Jul 2017 22:14:15 +0000 (00:14 +0200)
The copy of variable into a shorter one enlarges the codes size when the
variable is used only once. So don't copy it.

src/scripts/hints.js

index e75afcb..19b56b8 100644 (file)
@@ -551,14 +551,13 @@ var hints = Object.freeze((function(){
             return show(true);
         },
         update: function(n) {
-            var pos,
-                keys = config.hintKeys;
+            var pos;
             /* delete last hint-keys filter digit */
             if (null === n && filterKeys.length) {
                 filterKeys = filterKeys.slice(0, -1);
                 return show(false);
             }
-            if ((pos = keys.indexOf(n)) >= 0) {
+            if ((pos = config.hintKeys.indexOf(n)) >= 0) {
                 filterKeys = filterKeys + n;
                 return show(true);
             }