From 81edc1407071c6c0328f40a1ee487ea0388b9a7e Mon Sep 17 00:00:00 2001
From: Vendicated <vendicated@riseup.net>
Date: Sat, 12 Nov 2022 15:09:02 +0100
Subject: fix PronounDB crash with new profile in dms, force start dependencies

---
 src/webpack/common.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/webpack/common.tsx')

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;
-- 
cgit 

