mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-05 11:14:11 +01:00
More sanity in completion changes in last commit.
This commit is contained in:
@@ -339,12 +339,8 @@ CompletionContext.prototype = {
|
|||||||
{
|
{
|
||||||
let [k, v] = i;
|
let [k, v] = i;
|
||||||
let _k = "_" + k;
|
let _k = "_" + k;
|
||||||
if (typeof v == "string" && !/^[a-z_$][0-9a-z_$]*$/i.test(v))
|
if (typeof v == "string" && /^[.[]/.test(v))
|
||||||
{
|
|
||||||
if (!/[.[]/.test(v[0]))
|
|
||||||
v = "." + v;
|
|
||||||
v = eval("(function(i) i" + v + ")")
|
v = eval("(function(i) i" + v + ")")
|
||||||
}
|
|
||||||
if (typeof v == "function")
|
if (typeof v == "function")
|
||||||
res.__defineGetter__(k, function () _k in this ? this[_k] : (this[_k] = v(this.item)));
|
res.__defineGetter__(k, function () _k in this ? this[_k] : (this[_k] = v(this.item)));
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user