Skip to content

Commit

Permalink
Improve error message when IHDR is not first chunk
Browse files Browse the repository at this point in the history
This fixes a typo in the error message and (hopefully) makes it a little
clearer.
  • Loading branch information
EvanHahn authored and lukeapage committed May 6, 2023
1 parent aff3a9d commit 3400d63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Parser.prototype._parseChunkBegin = function (data) {
// safeToCopy = Boolean(data[7] & 0x20); // or unsafe

if (!this._hasIHDR && type !== constants.TYPE_IHDR) {
this.error(new Error("Expected IHDR on beggining"));
this.error(new Error("Expected IHDR to be first chunk"));
return;
}

Expand Down

0 comments on commit 3400d63

Please sign in to comment.