Skip to content

Commit

Permalink
perf: remove handler check
Browse files Browse the repository at this point in the history
We'll just crash hard if there is an internal error.
  • Loading branch information
lddubeau committed Aug 15, 2018
1 parent bb2085c commit fbe35ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/saxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,7 @@ class SaxesParser {
i: 0,
};
while (chunkState.i < limit) {
const handler = this[this.state];
if (!handler) {
throw new Error(this, `Unknown state: ${this.state}`);
}
handler.call(this, chunkState);
this[this.state].call(this, chunkState);
}

return this;
Expand Down

0 comments on commit fbe35ff

Please sign in to comment.