From b12078128bd3054b88a54a5edf5324d396710d53 Mon Sep 17 00:00:00 2001 From: Pedro Bonamin <46196328+pedrobonamin@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:46:48 +0200 Subject: [PATCH] fix: use path separator in getVersionId split Co-authored-by: Ash --- packages/sanity/src/core/util/draftUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sanity/src/core/util/draftUtils.ts b/packages/sanity/src/core/util/draftUtils.ts index 17b84aaed6b..763fe9c9d1b 100644 --- a/packages/sanity/src/core/util/draftUtils.ts +++ b/packages/sanity/src/core/util/draftUtils.ts @@ -85,7 +85,7 @@ export function getDraftId(id: string): DraftId { /** @internal */ export function getVersionId(id: string, bundle: string): string { if (isVersionId(id)) { - const [_versionPrefix, versionId, ...publishedId] = id.split('.') + const [_versionPrefix, versionId, ...publishedId] = id.split(PATH_SEPARATOR) if (versionId === bundle) return id return `${VERSION_PREFIX}${bundle}${PATH_SEPARATOR}${publishedId}` }