Disable only AFTER all internal data is readed

This commit is contained in:
NI
2019-09-15 07:02:34 +08:00
parent 10c0cc2e73
commit 02097cdd1c

View File

@@ -79,10 +79,6 @@ export class Subscribe {
*
*/
subscribe() {
if (this.disabled) {
throw new Exception(this.disabled, false);
}
if (this.pending.length > 0) {
let p = this.pending.shift();
@@ -98,6 +94,10 @@ export class Subscribe {
}
}
if (this.disabled) {
throw new Exception(this.disabled, false);
}
let self = this;
return new Promise((resolve, reject) => {