From 97fa4718ae33001e428bcaaaaf7951f6b094cd96 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 26 Sep 2018 03:04:33 +0300 Subject: [PATCH] part 1 of a fix to attr viaibility bug... Signed-off-by: Alex A. Naanou --- diff.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/diff.js b/diff.js index 72350d7..d67d1c6 100644 --- a/diff.js +++ b/diff.js @@ -736,16 +736,16 @@ object.makeConstructor('AT', Object.assign(Object.create(LogicType.prototype), { [] // pattern key,,, : k instanceof LogicType ? - Object.entries(o) - .filter(function(e){ - return cmp(k, e[0], context) }) - .map(function(e){ - return e[1] }) + [...getAllKeys(o)] + .filter(function(n){ + return cmp(k, n, context) }) + .map(function(n){ + return o[n] }) // normal key... // NOTE: we are not using 'k in o' here because // only objects are supported by the in // operator and we can get any value... - : Object.keys(o).indexOf(k) >= 0 ? + : getAllKeys(o).has(k) ? [o[k]] // key not in container... : [] })