fix(browser): pass optional then= through store_set

Theme toggle wrote localStorage but never chained to apply_theme because store_set dropped then.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-18 14:22:54 +08:00
1 parent 42ddeb14e7
commit bd06aedb90
2 files changed
+8

No files matched your search

+4
View File
@@ -194,8 +194,10 @@ focus.
+ `key`
+ `value`
+ `scope`="memory"
+ `then`=""
In-memory (or local/session) key write for SPA client state. Prefer `scope=memory` for tab-local app state.
Optional `then` is called after the write with `{ok, op, key, scope}`.
`spec` =
@@ -203,6 +205,8 @@ In-memory (or local/session) key write for SPA client state. Prefer `scope=memor
|----|-----|-------|-------|
| set | `key` | `value` | `scope` |
1. `then` != ""
**`spec` = > table.put in=spec at="then" value=then**
*> table.put in=None at="storage" value=spec*
## store_get