@social-mail/social-mail-client 1.8.275 → 1.8.277

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.
@@ -35590,18 +35590,17 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/di
35590
35590
  sendEmail() {
35591
35591
  return __awaiter(this, void 0, void 0, function* () {
35592
35592
  var _a, _b, _c;
35593
- if (!((_a = this.draft) === null || _a === void 0 ? void 0 : _a.textBody)) {
35594
- if (!((_c = (_b = this.draft) === null || _b === void 0 ? void 0 : _b.attachments) === null || _c === void 0 ? void 0 : _c.length)) {
35595
- alert("Cannot send empty email");
35596
- return;
35597
- }
35598
- }
35599
35593
  const {
35600
35594
  html,
35601
35595
  text
35602
35596
  } = this.editor.htmlTextContent;
35603
35597
  this.draft.htmlBody = html;
35604
35598
  this.draft.textBody = text;
35599
+ if (!((_a = this.draft) === null || _a === void 0 ? void 0 : _a.textBody)) {
35600
+ if (!((_c = (_b = this.draft) === null || _b === void 0 ? void 0 : _b.attachments) === null || _c === void 0 ? void 0 : _c.length)) {
35601
+ throw new Error("Cannot send empty email");
35602
+ }
35603
+ }
35605
35604
  yield this.save();
35606
35605
  const {
35607
35606
  prevSave
@@ -57496,12 +57495,14 @@ System.register([], function (_export, _context) {
57496
57495
  setters: [],
57497
57496
  execute: function () {
57498
57497
  cdn = (_b = (_a = window.socialMail) === null || _a === void 0 ? void 0 : _a.cdn) !== null && _b !== void 0 ? _b : "";
57499
- if (cdn) {
57500
- cdn = "https://" + cdn;
57501
- }
57502
57498
  _export("CDN", CDN = {
57503
57499
  toCDNUrl(url) {
57504
- return cdn + url;
57500
+ if (/^https?\:\/\//i.test(url)) {
57501
+ const u = new URL(url);
57502
+ u.hostname = cdn;
57503
+ return u.toString();
57504
+ }
57505
+ return "https://" + cdn + url;
57505
57506
  }
57506
57507
  });
57507
57508
  }