@graffy/stream
Advanced tools
Comparing version 0.14.6-beta2 to 0.14.6-beta3
@@ -66,6 +66,12 @@ "use strict"; | ||
var close = init(push, end); | ||
var close; | ||
var initialized = false; | ||
return _ref = { | ||
debugId: debugId, | ||
next: function next() { | ||
if (!initialized) { | ||
close = init(push, end); | ||
initialized = true; | ||
} | ||
if (drain && payloads.length <= lowWatermark) { | ||
@@ -88,3 +94,3 @@ drain(); | ||
payloads.length = 0; | ||
close(null, value); | ||
if (close) close(null, value); | ||
return complete; | ||
@@ -95,3 +101,3 @@ }, | ||
payloads.length = 0; | ||
close(error); | ||
if (close) close(error); | ||
return complete; | ||
@@ -98,0 +104,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"author": "aravind (https://github.com/aravindet)", | ||
"version": "0.14.6-beta2", | ||
"version": "0.14.6-beta3", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "source": "src/index.js", |
@@ -34,3 +34,4 @@ /* | ||
const close = init(push, end); | ||
let close; | ||
let initialized = false; | ||
@@ -41,2 +42,6 @@ return { | ||
next: () => { | ||
if (!initialized) { | ||
close = init(push, end); | ||
initialized = true; | ||
} | ||
if (drain && payloads.length <= lowWatermark) { | ||
@@ -54,3 +59,3 @@ drain(); | ||
payloads.length = 0; | ||
close(null, value); | ||
if (close) close(null, value); | ||
return complete; | ||
@@ -62,3 +67,3 @@ }, | ||
payloads.length = 0; | ||
close(error); | ||
if (close) close(error); | ||
return complete; | ||
@@ -65,0 +70,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9899
201