Skip to content

Commit 2101371

Browse files
gengjiawenBridgeAR
authored andcommitted
repl: remove redundant escape
PR-URL: #26496 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 6b004e0 commit 2101371

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
@@ -226,7 +226,7 @@ function REPLServer(prompt,
226226
let awaitPromise = false;
227227
const input = code;
228228

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

0 commit comments

Comments
 (0)