Skip to content

Commit 24e5e91

Browse files
author
Christian Bender
committedApr 9, 2018
removed error handling
1 parent dee0191 commit 24e5e91

File tree

2 files changed

+13298
-6
lines changed

2 files changed

+13298
-6
lines changed
 

Diff for: ‎package-lock.json

+13,296
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎src/js/others/balanced-symbols.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@ export function parenthesesChecker(symbols) {
1717
} else if (stack.isEmpty()) {
1818
balanced = false;
1919
} else {
20-
if (!stack.isEmpty()) {
21-
top = stack.pop();
22-
if (!(opens.indexOf(top) === closers.indexOf(symbol))) {
23-
balanced = false;
24-
}
25-
} else { // error case
20+
top = stack.pop();
21+
if (!(opens.indexOf(top) === closers.indexOf(symbol))) {
2622
balanced = false;
2723
}
2824
}

0 commit comments

Comments
 (0)
Please sign in to comment.