@stemy/ngx-utils 12.0.4 → 12.0.5

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.
@@ -4833,9 +4833,12 @@
4833
4833
  AsyncMethodDirective.prototype.callMethod = function () {
4834
4834
  var _this = this;
4835
4835
  if (this.loading)
4836
- return;
4836
+ return true;
4837
+ var result = !this.method ? null : this.method(this.context);
4838
+ if (!(result instanceof Promise))
4839
+ return false;
4837
4840
  this.loading = true;
4838
- this.method(this.context).then(function (result) {
4841
+ result.then(function (result) {
4839
4842
  _this.loading = false;
4840
4843
  if (result) {
4841
4844
  _this.onSuccess.emit(result);
@@ -4848,6 +4851,7 @@
4848
4851
  _this.onError.emit(reason);
4849
4852
  _this.toaster.error(reason.message, reason.context);
4850
4853
  });
4854
+ return true;
4851
4855
  };
4852
4856
  return AsyncMethodDirective;
4853
4857
  }());