@social-mail/social-mail-client 1.2.549 → 1.2.550

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.2.549",
3
+ "version": "1.2.550",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -180,16 +180,18 @@ export default class WebSitePageEditor extends HtmlPageEditor {
180
180
  }
181
181
 
182
182
  pending.push(async () => {
183
- const stylerFile = await this.cloudFileService.children(this.folder.appFileID, "styles/styler.css")
183
+ let stylerFile = await this.cloudFileService.children(this.folder.appFileID, "styles/styler.css")
184
184
  .firstOrDefault();
185
- const stylerContent = stylerFile
186
- ? await FetchBuilder.get(stylerFile.downloadUrl).responseAsText()
187
- : null;
188
- const newStyle = StylerSet.instance.toString();
189
- if (stylerContent !== newStyle) {
190
- const stylerCSS = await this.createFile("styler.css", newStyle);
191
- await this.addStyleSheet(doc, stylerCSS, "styles/styler.css");
185
+ if (!stylerFile) {
186
+ stylerFile = await this.createFile("styler.css", StylerSet.instance.toString());
187
+ } else {
188
+ const stylerContent = await FetchBuilder.get(stylerFile.downloadUrl).responseAsText();
189
+ const newStyle = StylerSet.instance.toString();
190
+ if (stylerContent !== newStyle) {
191
+ stylerFile = await this.createFile("styler.css", newStyle);
192
+ }
192
193
  }
194
+ await this.addStyleSheet(doc, stylerFile, "styles/styler.css");
193
195
  });
194
196
 
195
197
  pending.push(async () => {