Skip to content

Commit 1080a1a

Browse files
gengjiawenBethGriggs
authored andcommitted
repl: remove redundant escape
PR-URL: #26496 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 0a976ec commit 1080a1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/repl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ function REPLServer(prompt,
233233
var awaitPromise = false;
234234
var input = code;
235235

236-
if (/^\s*\{/.test(code) && /\}\s*$/.test(code)) {
236+
if (/^\s*{/.test(code) && /}\s*$/.test(code)) {
237237
// It's confusing for `{ a : 1 }` to be interpreted as a block
238238
// statement rather than an object literal. So, we first try
239239
// to wrap it in parentheses, so that it will be interpreted as

0 commit comments

Comments
 (0)