diff --git a/modules/rpubs/components/folk-pubs-editor.ts b/modules/rpubs/components/folk-pubs-editor.ts index 81e0b58..8d5a354 100644 --- a/modules/rpubs/components/folk-pubs-editor.ts +++ b/modules/rpubs/components/folk-pubs-editor.ts @@ -98,7 +98,7 @@ export class FolkPubsEditor extends HTMLElement { } async connectedCallback() { - this.attachShadow({ mode: "open" }); + if (!this.shadowRoot) this.attachShadow({ mode: "open" }); this._tour = new TourEngine( this.shadowRoot!, FolkPubsEditor.TOUR_STEPS, @@ -598,7 +598,7 @@ export class FolkPubsEditor extends HTMLElement { this.render(); try { - const res = await fetch(`/${this._spaceSlug}/pubs/api/generate`, { + const res = await fetch(`/${this._spaceSlug}/rpubs/api/generate`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({