@social-mail/social-mail-client 1.2.49 → 1.2.50

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.49",
3
+ "version": "1.2.50",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -526,13 +526,14 @@ export default class HtmlPageEditor extends AtomControl {
526
526
  }
527
527
  // inject script
528
528
  if (clone.querySelector(`[styler-layout="component"]`)) {
529
- if(!clone.querySelector("[styler-component-script]")) {
530
- const script = this.htmlDocument.createElement("script");
531
- script.src = UMD.resolvePath("@social-mail/social-mail-client/component.js");
532
- script.setAttribute("styler-component-script", "component-script");
529
+ let componentScript = clone.querySelector("[styler-component-script]") as HTMLScriptElement;
530
+ if(!componentScript) {
531
+ componentScript = this.htmlDocument.createElement("script");
533
532
  const head = clone.querySelector("head");
534
- head.appendChild(script);
533
+ head.appendChild(componentScript);
535
534
  }
535
+ componentScript.src = UMD.resolvePath("@social-mail/social-mail-client/component.js");
536
+ componentScript.setAttribute("styler-component-script", "component-script");
536
537
  }
537
538
  const currentHtml = clone.innerHTML;
538
539
  if (!lastHtml) {