diff --git a/package.json b/package.json index d513cdf..2656919 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hygraph/preview-sdk", - "version": "1.0.2", + "version": "1.0.3", "description": "Content preview SDK for seamless real-time content editing in Hygraph CMS", "publishConfig": { "access": "public" diff --git a/src/core/Preview.ts b/src/core/Preview.ts index a5bc8b9..43ada47 100644 --- a/src/core/Preview.ts +++ b/src/core/Preview.ts @@ -604,7 +604,7 @@ export class Preview { } private buildStudioUrl(entryId: string, fieldApiId?: string, locale?: string, componentChain?: ComponentChainLink[]): string { - const baseUrl = this.config.studioUrl || 'https://app.hygraph.com'; + const baseUrl = (this.config.studioUrl || 'https://app.hygraph.com').replace(/\/+$/, ''); const params = new URLSearchParams({ endpoint: this.config.endpoint, entryId,