# V2.2.1 \[Bug\] 1 space-lua block permits only 1 command.define, multiple will fail

**URL:** <https://community.silverbullet.md/t/v2-2-1-bug-1-space-lua-block-permits-only-1-command-define-multiple-will-fail/3501>\
**Category:** Troubleshooting\
**Created:** [November 6, 2025, 6:20am UTC](https://community.silverbullet.md/t/v2-2-1-bug-1-space-lua-block-permits-only-1-command-define-multiple-will-fail/3501 "2025-11-06T06:20:22Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ChenZhu-Xie](https://community.silverbullet.md/user_avatar/community.silverbullet.md/chenzhu-xie/32/1476_2.png) [@ChenZhu-Xie](https://community.silverbullet.md/u/ChenZhu-Xie)\
**Post date:** [November 6, 2025, 8:16am UTC](https://community.silverbullet.md/t/v2-2-1-bug-1-space-lua-block-permits-only-1-command-define-multiple-will-fail/3501/5 "2025-11-06T08:16:50Z")

</div>

**I digged out the source:**

applying

```auto
-- priority: -1
event.listen {
  name = 'hooks:renderTopWidgets',
  run = function(e)
    if not editor.getUiOption("darkMode") then
      editor.setUiOption("darkMode", true)
    end
  end
}

```

and `Client: Wipe` + `Reindex` will cause this problem.

while replaced by

```auto
-- priority: -1
event.listen {
  name = "hooks:renderTopWidgets",
  run = function(e)
    if not clientStore.get("darkMode") then
      clientStore.set("darkMode", true)
      editor.reloadUI()
    end
  end
}

```

there’ll be no problem then.

**Seemingly unrelated huh?.. but it just happened…**

the whole story origins from that I don’t what [the flash caused by editor.reloadUI()…](https://community.silverbullet.md/t/permanent-dark-mode/370/9) then I came up with the `editor.setUiOption("darkMode", true)`, then here comes the problem…

---

_[View the full topic](https://community.silverbullet.md/t/v2-2-1-bug-1-space-lua-block-permits-only-1-command-define-multiple-will-fail/3501)._
