Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doing {{}} crashes the program #28

Open
PythonCoderAS opened this issue Apr 19, 2020 · 0 comments
Open

Doing {{}} crashes the program #28

PythonCoderAS opened this issue Apr 19, 2020 · 0 comments

Comments

@PythonCoderAS
Copy link

I was just tinkering with JavaScript objects, and I decided to make an object {{}}. This caused the program to crash.

> {{}} 
(node:13519) UnhandledPromiseRejectionWarning: evalmachine.<anonymous>:1
({{}})
  ^

SyntaxError: Unexpected token '{'
    at new Script (vm.js:99:7)
    at Object.<anonymous> (/Users/example/.npm/_npx/13516/lib/node_modules/jay-repl/dist/eval.js:92:24)
    at Generator.next (<anonymous>)
    at /Users/example/.npm/_npx/13516/lib/node_modules/jay-repl/dist/eval.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/example/.npm/_npx/13516/lib/node_modules/jay-repl/dist/eval.js:3:12)
    at evaluate (/Users/example/.npm/_npx/13516/lib/node_modules/jay-repl/dist/eval.js:90:32)
    at /Users/example/.npm/_npx/13516/lib/node_modules/jay-repl/dist/cli.js:148:47
    at Generator.next (<anonymous>)
    at fulfilled (/Users/example/.npm/_npx/13516/lib/node_modules/jay-repl/dist/cli.js:5:58)
(node:13519) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:13519) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I tested this in the normal node repl, and it left undefined as expected.

> {{}}
undefined

Related: #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant