@nxtedition/shared 2.0.1 → 2.0.2

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.
Files changed (2) hide show
  1. package/index.js +1 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -35,10 +35,7 @@ async function* _reader({ sharedState, sharedBuffer }, cb) {
35
35
  const raw = buffer.subarray(readPos + 4, readPos + len)
36
36
  readPos += len
37
37
  if (cb) {
38
- const thenable = cb(raw)
39
- if (thenable && typeof thenable.then === 'function') {
40
- await thenable
41
- }
38
+ await cb(raw)
42
39
  } else {
43
40
  yield raw
44
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/shared",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Ring Buffer for NodeJS cross Worker communication",
5
5
  "main": "index.js",
6
6
  "repository": {