Skip to content

Commit

Permalink
Allow expressions with commas in eval()
Browse files Browse the repository at this point in the history
Signed-off-by: William So <polyipseity@gmail.com>
  • Loading branch information
polyipseity committed May 1, 2023
1 parent 6bea3e7 commit 72c619c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/terminal/pseudoterminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ export class ConsolePseudoterminal
if (!ast) { return }
const lastStmt = ast.body.at(-1),
code2 = lastStmt
? `${code.slice(0, lastStmt.start)}export default ${code
.slice(lastStmt.start)}`
? `${code.slice(0, lastStmt.start)}export default (${code
.slice(lastStmt.start)})`
: "",
url = URL.createObjectURL(new Blob(
[code],
Expand Down

0 comments on commit 72c619c

Please sign in to comment.