1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-26 07:22:28 +01:00

Fix validateCompleter for non-string options.

--HG--
extra : rebase_source : 61572ff0037fddbc3ec06af8040e7ca4d4bb3096
This commit is contained in:
Kris Maglione
2014-02-25 08:59:48 -08:00
parent 05b8f2e7f9
commit fc52da1af5

View File

@@ -740,9 +740,9 @@ var Option = Class("Option", {
acceptable = completions.call(this);
if (isArray(acceptable))
acceptable = RealSet(acceptable.map(([k]) => (k)));
acceptable = RealSet(acceptable.map(([k]) => k));
else
acceptable = RealSet(Object.keys(acceptable));
acceptable = RealSet(this.parse(k) for (k in Object.keys(acceptable)));
if (this.type === "regexpmap" || this.type === "sitemap")
return Array.concat(vals).every(re => acceptable.has(re.result));