Finished is now optional

This commit is contained in:
Luke Page 2015-08-06 19:57:39 +01:00
parent 735902ff9e
commit 2fbf81e598
2 changed files with 3 additions and 4 deletions

View file

@ -52,9 +52,6 @@ module.exports = function(buffer, options) {
error: handleError,
metadata: handleMetaData,
gamma: handleGamma,
finished: function() {
//todo make optional
},
inflateData: handleInflateData,
createData: createData
});

View file

@ -286,5 +286,7 @@ Parser.prototype._parseIEND = function(data) {
this._hasIEND = true;
this._handleChunkEnd();
this.finished();
if (this.finished) {
this.finished();
}
};