-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Enhance compatibility and the plugin command cannot be set to empty #9231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
这个插件安装了是正常可以打开的,可能是版本兼容的问题,看了下应该么什么问题。如果还有问题麻烦继续跟帖,我先关闭了。 |
v姐你试的太晚了……我已经提交给插件作者修正了。但是这个问题依然需要修复,因为不能控制插件的行为。 另外,我在本地测试插件的适合,偶尔会发生没有正确赋值给customHotKey,导致直接报错,快捷键界面也打不开。这证明哪怕插件不出错,也有概率出现这个问题,需要增加一个错误捕获机制。 增加的位点在这: siyuan/app/src/config/keymap.ts Line 36 in 09e2e62
|
是 commands 为空抛错还是 forEach 里面报错。这个需要根据错误信息进行容错处理。 |
在foreach中会报错,根据测试, const keyValue = updateHotkeyTip(command.customHotkey);
commandHTML += ... 都有概率出错。 |
跟了下代码, try catch 可能会存在数据不一致的问题,还麻烦把插件及对应的版本发我一下,我看看具体问题。 |
https://github.com/zuoez02/siyuan-plugin-devtool/releases/tag/v0.1.7 这个版本应该是会出错的。 另外插件没问题的情况下,customHotkey有时候也会很奇怪的赋值失败,变为undefined,导致updateHotkeyTip运行报错 |
感谢,已改进 |
Is there an existing issue for this?
Can the issue be reproduced with the default theme (daylight/midnight)?
Could the issue be due to extensions?
Describe the problem
目前快捷键界面是使用HTML字符拼接生成的,并且没有容错机制 假如插件传递了一个错误的快捷键设置,就会导致快捷键界面空白,无法打开。
比如developer tool插件,由于快捷键功能是在未能自定义快捷键的时间节点增加的,所以缺乏html拼接时的部分字段,导致快捷键界面无法打开。
Expected result
增加容错机制,只忽略错误的快捷键。
Screenshot or screen recording presentation
No response
Version environment
Log file
无需日志
More information
No response
The text was updated successfully, but these errors were encountered: