summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorthefliik <thefliik@yahoo.com>2019-01-23 17:23:25 -0800
committerRyan Dahl <ry@tinyclouds.org>2019-01-23 20:23:25 -0500
commit41cf82870b73d3a8254c518b27dc02dcbb5032f5 (patch)
treeec4bf4dc3596f8cbd553236ca12468d8e2a6f2b9 /js
parente470f31d328884303e56f2f15a4121b8ffe097a6 (diff)
Minor optimization to repl.ts (#1561)
Diffstat (limited to 'js')
-rw-r--r--js/repl.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/repl.ts b/js/repl.ts
index 806a3e142..4fae31eab 100644
--- a/js/repl.ts
+++ b/js/repl.ts
@@ -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;
}
}