@pobuca/email-builder 1.3.2 → 1.3.3

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.
@@ -2974,8 +2974,12 @@
2974
2974
  PbEmailBuilderComponent.prototype.saveEmail = function () {
2975
2975
  var _this = this;
2976
2976
  return this.emailObjectStore.currentEmailHasChanges$
2977
- .pipe(operators.exhaustMap(function (hasChanges) {
2978
- return rxjs.iif(function () { return hasChanges; }, _this.ngb.createHTMLTemplate$(), _this.userInterfaceService.notify('No changes were detected to be save!').afterDismissed());
2977
+ .pipe(operators.withLatestFrom(this.emailObjectStore.templateAsObservable$), operators.exhaustMap(function (_c) {
2978
+ var _d = __read(_c, 2), hasChanges = _d[0], currentHtml = _d[1];
2979
+ if (hasChanges || !currentHtml) {
2980
+ return _this.ngb.createHTMLTemplate$();
2981
+ }
2982
+ return _this.userInterfaceService.notify('No changes were detected to be saved!').afterDismissed();
2979
2983
  }), operators.take(1))
2980
2984
  .subscribe();
2981
2985
  };