@micropermit/client-angular 0.2.9-beta.9 → 0.2.10

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.
@@ -815,13 +815,15 @@
815
815
  };
816
816
  /**
817
817
  * @param {?=} interval
818
+ * @param {?=} errorHandler
818
819
  * @return {?}
819
820
  */
820
821
  LinkField.prototype.refresh = /**
821
822
  * @param {?=} interval
823
+ * @param {?=} errorHandler
822
824
  * @return {?}
823
825
  */
824
- function (interval) {
826
+ function (interval, errorHandler) {
825
827
  var _this = this;
826
828
  if (interval) {
827
829
  this.stopRefresh();
@@ -834,7 +836,16 @@
834
836
  _this.isRefreshing = false;
835
837
  });
836
838
  this.isRefreshing = true;
837
- this.initWithObs().subscribe(resCb, resCb, resCb);
839
+ this.initWithObs().subscribe(resCb, (/**
840
+ * @param {?} error
841
+ * @return {?}
842
+ */
843
+ function (error) {
844
+ resCb();
845
+ if (errorHandler) {
846
+ errorHandler(error);
847
+ }
848
+ }), resCb);
838
849
  if (interval) {
839
850
  this.intervalId = setInterval((/**
840
851
  * @return {?}
@@ -842,7 +853,16 @@
842
853
  function () {
843
854
  if (!_this.isRefreshing) {
844
855
  _this.isRefreshing = true;
845
- _this.initWithObs().subscribe(resCb, resCb, resCb);
856
+ _this.initWithObs().subscribe(resCb, (/**
857
+ * @param {?} error
858
+ * @return {?}
859
+ */
860
+ function (error) {
861
+ resCb();
862
+ if (errorHandler) {
863
+ errorHandler(error);
864
+ }
865
+ }), resCb);
846
866
  }
847
867
  }), interval);
848
868
  }