cbor-x 1.5.5 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node.cjs CHANGED
@@ -2408,13 +2408,12 @@ class DecoderStream extends stream.Transform {
2408
2408
  let values;
2409
2409
  try {
2410
2410
  values = this.decoder.decodeMultiple(chunk);
2411
- callback();
2412
2411
  } catch(error) {
2413
2412
  if (error.incomplete) {
2414
2413
  this.incompleteBuffer = chunk.slice(error.lastPosition);
2415
2414
  values = error.values;
2416
2415
  } else {
2417
- callback(error);
2416
+ return callback(error)
2418
2417
  }
2419
2418
  } finally {
2420
2419
  for (let value of values || []) {
@@ -2423,6 +2422,7 @@ class DecoderStream extends stream.Transform {
2423
2422
  this.push(value);
2424
2423
  }
2425
2424
  }
2425
+ callback();
2426
2426
  }
2427
2427
  getNullValue() {
2428
2428
  return Symbol.for(null)