0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 20:25:12 -05:00

Minor optimization to repl.ts (#1561)

This commit is contained in:
thefliik 2019-01-23 17:23:25 -08:00 committed by Ryan Dahl
parent e470f31d32
commit 41cf82870b

View file

@ -124,7 +124,7 @@ function parenthesesAreOpen(code: string): boolean {
if (bracePosition % 2 === 0) {
stack.push(bracePosition + 1); // push next expected brace position
} else {
if (stack.length === 0 || stack.pop() !== bracePosition) {
if (stack.pop() !== bracePosition) {
return false;
}
}