Skip to content

v1.2.6 — 修复 HUD 不加载(重复求值)

Choose a tag to compare

@worldconfig worldconfig released this 20 Oct 19:20

修复:客户端脚本被重复求值时整个 HUD 不加载。

  • 根因:宿主把所有插件的 client.js 拼成一个脚本,并在版本变化时重复求值;lib/client.js 顶层的 const AUTHOR_FINGERPRINT 第二次求值触发 Identifier has already been declared,整块插件导入失败;
  • 修复:把指纹常量移进 factory 函数作用域,文件顶层不再有任何声明;
  • 新增 1 条 vm 双重求值回归测试(总计 112 项);
  • README 记录该约束:客户端入口禁止顶层 const/let/class。

安装:plugin_manager install_bundle target: github:worldconfig/dsh-plugin-usage-cost#v1.2.6