Clean up ui/stream/subscribe.js
This commit is contained in:
@@ -47,13 +47,13 @@ export class Subscribe {
|
|||||||
* @param {any} d Resolve data which will be send to the subscriber
|
* @param {any} d Resolve data which will be send to the subscriber
|
||||||
*/
|
*/
|
||||||
resolve(d) {
|
resolve(d) {
|
||||||
if (this.res === null) {
|
if (this.res !== null) {
|
||||||
this.pending.push([typeResolve, d]);
|
this.res(d);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.res(d);
|
this.pending.push([typeResolve, d]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -63,13 +63,13 @@ export class Subscribe {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
reject(e) {
|
reject(e) {
|
||||||
if (this.rej === null) {
|
if (this.rej !== null) {
|
||||||
this.pending.push([typeReject, e]);
|
this.rej(e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.rej(e);
|
this.pending.push([typeReject, e]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user