Fixed none left hint mode if no hint is available (#53).
authorDaniel Carl <danielcarl@gmx.de>
Thu, 19 Dec 2013 12:44:54 +0000 (13:44 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Thu, 19 Dec 2013 12:44:54 +0000 (13:44 +0100)
src/hints.js

index c1b3d10..b36bc0b 100644 (file)
@@ -270,7 +270,9 @@ var VbHint = (function(){
             }
         }
 
-        if (validHints.length === 1) {
+        /* if no hint is matche or only one remains fire it */
+        /* fire will also handle the case when there is not valid hint found */
+        if (validHints.length <= 1) {
             return fire();
         }
         return focusHint(1, activeHint);