Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / Subscription.js
index 78301c66d846e887d00ed58e91b66e4ae4323f99..82ac7b7cbd67336f543415ff928e78ab935af2f7 100644 (file)
@@ -8,6 +8,7 @@ export class Subscription {
         this._parentOrParents = null;
         this._subscriptions = null;
         if (unsubscribe) {
+            this._ctorUnsubscribe = true;
             this._unsubscribe = unsubscribe;
         }
     }
@@ -16,7 +17,7 @@ export class Subscription {
         if (this.closed) {
             return;
         }
-        let { _parentOrParents, _unsubscribe, _subscriptions } = this;
+        let { _parentOrParents, _ctorUnsubscribe, _unsubscribe, _subscriptions } = this;
         this.closed = true;
         this._parentOrParents = null;
         this._subscriptions = null;
@@ -30,6 +31,9 @@ export class Subscription {
             }
         }
         if (isFunction(_unsubscribe)) {
+            if (_ctorUnsubscribe) {
+                this._unsubscribe = undefined;
+            }
             try {
                 _unsubscribe.call(this);
             }