Skip to content

Commit

Permalink
Minor optimization to repl.ts (denoland#1561)
Browse files Browse the repository at this point in the history
  • Loading branch information
thefliik authored and ry committed Jan 24, 2019
1 parent e470f31 commit 41cf828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/repl.ts
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 41cf828

Please sign in to comment.