From 879636a6bda907f28324340f138d3662602ab6c3 Mon Sep 17 00:00:00 2001 From: Kurt Thiemann Date: Thu, 7 Jul 2022 16:09:03 +0200 Subject: [PATCH] fixed error when updating checksum in AbstractDataProcessor --- package.json | 2 +- src/DataProcessor/AbstractDataProcessor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d65bcbb..af733cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "armarius", - "version": "1.4.1", + "version": "1.4.2", "description": "A JavaScript library to read, write, and merge ZIP archives in web browsers.", "repository": "github:aternosorg/armarius", "type": "module", diff --git a/src/DataProcessor/AbstractDataProcessor.js b/src/DataProcessor/AbstractDataProcessor.js index 3f16904..b6e811a 100644 --- a/src/DataProcessor/AbstractDataProcessor.js +++ b/src/DataProcessor/AbstractDataProcessor.js @@ -68,7 +68,7 @@ export default class AbstractDataProcessor extends DataProcessor { */ async read(length) { let chunk = await this.generate(length); - if(this.postCrc) { + if(this.postCrc && chunk !== null) { this.postCrc.add(chunk); }