@mtgame/core 0.1.60 → 0.1.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9935,22 +9935,22 @@
9935
9935
  }(StorageEngine));
9936
9936
 
9937
9937
  function componentDestroyed(component) {
9938
- if (!component.constructor.__decoratorApplied) {
9938
+ if (!component.__decoratorApplied) {
9939
9939
  throw new Error('Use @UntilDestroy decorator in class');
9940
9940
  }
9941
- if (!component.constructor.__componentDestroyed$) {
9942
- component.constructor.__componentDestroyed$ = new Subject.Subject();
9941
+ if (!component.__componentDestroyed$) {
9942
+ component.__componentDestroyed$ = new Subject.Subject();
9943
9943
  }
9944
- return component.constructor.__componentDestroyed$;
9944
+ return component.__componentDestroyed$;
9945
9945
  }
9946
9946
  function UntilDestroy(cmpType) {
9947
9947
  var original = cmpType.prototype.ngOnDestroy;
9948
- cmpType.__componentDestroyed$ = new Subject.Subject();
9949
- cmpType.__decoratorApplied = true;
9948
+ cmpType.prototype.__componentDestroyed$ = new Subject.Subject();
9949
+ cmpType.prototype.__decoratorApplied = true;
9950
9950
  cmpType.prototype.ngOnDestroy = function () {
9951
- cmpType.__componentDestroyed$.next();
9952
- cmpType.__componentDestroyed$.complete();
9953
- delete cmpType.__componentDestroyed$;
9951
+ this.__componentDestroyed$.next();
9952
+ this.__componentDestroyed$.complete();
9953
+ delete this.__componentDestroyed$;
9954
9954
  original.call(this);
9955
9955
  };
9956
9956
  }