Skip to content

Commit

Permalink
remove garbage
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubobubobubobubo committed Aug 10, 2023
1 parent b6d280c commit 1ff0d46
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 77 deletions.
3 changes: 1 addition & 2 deletions src/Evaluator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Editor } from './main';
import type { File } from './AppSettings';
import { parseUserCode } from './Walker';

const delay = (ms: number) => new Promise((_, reject) => setTimeout(() => reject(new Error('Operation took too long')), ms));

Expand All @@ -16,7 +15,7 @@ const tryCatchWrapper = (application: Editor, code: string): Promise<boolean> =>
*/
return new Promise((resolve, _) => {
try {
Function(`with (this) {try{${parseUserCode(code)}} catch (e) {console.log(e)}};`).call(application.api);
Function(`with (this) {try{${code}} catch (e) {console.log(e)}};`).call(application.api);
resolve(true);
} catch (error) {
console.log(error);
Expand Down
75 changes: 0 additions & 75 deletions src/Walker.ts

This file was deleted.

0 comments on commit 1ff0d46

Please sign in to comment.