zen-observable
Advanced tools
Comparing version 0.8.7 to 0.8.8
@@ -106,2 +106,5 @@ 'use strict'; | ||
var queue = subscription._queue; | ||
if (!queue) { | ||
return; | ||
} | ||
subscription._queue = undefined; | ||
@@ -108,0 +111,0 @@ subscription._state = 'ready'; |
{ | ||
"name": "zen-observable", | ||
"version": "0.8.7", | ||
"version": "0.8.8", | ||
"repository": "zenparsing/zen-observable", | ||
@@ -5,0 +5,0 @@ "description": "An Implementation of ES Observables", |
@@ -88,2 +88,5 @@ // === Symbol Support === | ||
let queue = subscription._queue; | ||
if (!queue) { | ||
return; | ||
} | ||
subscription._queue = undefined; | ||
@@ -90,0 +93,0 @@ subscription._state = 'ready'; |
@@ -80,2 +80,13 @@ import assert from 'assert'; | ||
it('drops queue if subscription is closed', async () => { | ||
let values = []; | ||
let subscription = new Observable(x => { x.next(1) }).subscribe({ | ||
next(val) { values.push(val) }, | ||
}); | ||
assert.deepEqual(values, []); | ||
subscription.unsubscribe(); | ||
await null; | ||
assert.deepEqual(values, []); | ||
}); | ||
it('queues if the observer is running', async () => { | ||
@@ -82,0 +93,0 @@ let observer; |
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
70663
2132