diff --git a/lib/index.js b/lib/index.js index 496b20d..710e899 100644 --- a/lib/index.js +++ b/lib/index.js @@ -245,6 +245,7 @@ function rewriteLiveAssembly(config, assembled, context) { }); } +/** Cordis 的 ctx 是 Proxy:未声明 inject 时点属性会抛 "cannot get property ... without inject",所以两段都要包 try。 */ function permissionPresetsOf(ctx) { try { const direct = ctx?.permissionPresets;