Skip to content

Commit

Permalink
fix: use path separator in getVersionId split
Browse files Browse the repository at this point in the history
Co-authored-by: Ash <[email protected]>
  • Loading branch information
pedrobonamin and juice49 authored Sep 20, 2024
1 parent 863527b commit b120781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sanity/src/core/util/draftUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
}
Expand Down

0 comments on commit b120781

Please sign in to comment.