git » hoplite.git » commit 6341c4f

Fix cellCache, add magical _eid

author Alan Dipert
2021-06-02 13:30:47 UTC
committer Alan Dipert
2021-06-02 13:30:47 UTC
parent dbd6c7d0364686b50414756c43cb9e236f15c471

Fix cellCache, add magical _eid

el.mjs +6 -2

diff --git a/el.mjs b/el.mjs
index d128b13..91c2ce2 100644
--- a/el.mjs
+++ b/el.mjs
@@ -57,8 +57,12 @@ function makeAttrCells(db, eidCell) {
   let cellCache = new Map();
   return new Proxy({}, {
     get: (obj, attrName) => {
-      if (cellCache.has(name))
-        return cellCache.get(name);
+      if (cellCache.has(attrName)) {
+        return cellCache.get(attrName);
+      }
+      if (attrName === "_eid") {
+        return eidCell;
+      }
       let attrValCell = input(null);
       watch((added, removed) => {
         if (added.size()) {