aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-01 14:27:13 +0100
committerVendicated <vendicated@riseup.net>2022-11-01 14:28:25 +0100
commit64aed87de41ecc614f742f999989f32e42826ea2 (patch)
tree5957174af6f7ed48cc9bab06bfef40b6ddf81633 /src/components
parent1944f3957fb8113b610a4e281d75ee36ac97a422 (diff)
downloadVencord-64aed87de41ecc614f742f999989f32e42826ea2.tar.gz
Vencord-64aed87de41ecc614f742f999989f32e42826ea2.tar.bz2
Vencord-64aed87de41ecc614f742f999989f32e42826ea2.zip
Fix Webpack modules that are not arrow funcs
Diffstat (limited to 'src/components')
-rw-r--r--src/components/PatchHelper.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/PatchHelper.tsx b/src/components/PatchHelper.tsx
index b490051..853febc 100644
--- a/src/components/PatchHelper.tsx
+++ b/src/components/PatchHelper.tsx
@@ -119,7 +119,7 @@ function ReplacementComponent({ module, match, replacement, setReplacementError
{!!diff?.length && (
<Button className={Margins.marginTop20} onClick={() => {
try {
- Function(patchedCode);
+ Function(patchedCode.replace(/^function\(/, "function patchedModule("));
setCompileResult([true, "Compiled successfully"]);
} catch (err) {
setCompileResult([false, (err as Error).message]);