diff options
Diffstat (limited to 'src/webpack/common.tsx')
-rw-r--r-- | src/webpack/common.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/webpack/common.tsx b/src/webpack/common.tsx index 8c77506..497dfe4 100644 --- a/src/webpack/common.tsx +++ b/src/webpack/common.tsx @@ -228,9 +228,11 @@ export const Menu = proxyLazy(() => { if (!hasDeobfuscator) { for (const m of menuItems) - map[m] = () => { - throw new Error(`Your plugin needs to depend on MenuItemDeobfuscatorApi to use ${m}`); - }; + Object.defineProperty(map, m, { + get() { + throw new Error("MenuItemDeobfuscator must be enabled to use this."); + } + }); } return map; |