18alantom / strawberry

Zero-dependency, build-free framework for the artisanal web.
https://strawberry.quest
MIT License
681 stars 15 forks source link

Inventory list is empty: a bug in updateComputed #5

Closed cy6erskunk closed 1 year ago

cy6erskunk commented 1 year ago

With the latest master, inventory items list is rendered empty.

image

The root cause for this is a part of commit 0a1e6038dbf41019eabebd32ccf34b886b98da58:

-      .filter((k) => k === key || key.startsWith(k + '.'))
+      .filter((k) => k === key || k.startsWith(key + '.'))

This seems to be a valid change, as it enables usage of dependents like a.toLowerCase (tested in test case 25).

However, it breaks cases where key parameter of the function updateComputed is like qtys.Strawberry.