diff options
Diffstat (limited to 'src/components/PatchHelper.tsx')
-rw-r--r-- | src/components/PatchHelper.tsx | 2 |
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]); |