koishijs / webui

WebUI plugins for Koishi
https://koishi.online
GNU Affero General Public License v3.0
29 stars 14 forks source link

Bug: `prefix` 配置项添加空项时写入 `null` #13

Closed ilharp closed 11 months ago

ilharp commented 2 years ago

Describe the bug

控制台对 prefix 添加空项时,该项会变为 null 写入配置文件,进而导致 Koishi 启动失败。

Steps to reproduce

使用 Koishi v4.7.6(Koi v0.2.3)直接添加 prefix 项并点击保存配置

image

重启失败

image

Expected behavior

manager 将空项视作空字串进行保存。这是用户最可能期望的结果,也是具有特定含义的结果。

Versions

Additional context

虽然 koishijs/console#12 可以解决报错无法启动的问题,但这并不能解决用户意图地添加空字串作为项的问题。应考虑将本 issue 作为独立的 bug 修复。

shigma commented 11 months ago

应该已经修复了。