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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user