Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/utils/Url.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import URLParse from "url-parse";

Check failure on line 1 in src/utils/Url.js

View workflow job for this annotation

GitHub Actions / Linting and formatting

format

File content differs from formatting output
import path from "./Path";
import Uri from "./Uri";

Expand Down Expand Up @@ -85,6 +85,9 @@
} else if (!rootCondition === !newDocIdCondition) {
root += "/";
}
// if pathname is undefined, meaning a docId/volume (e.g :primary:)
// has not been detected, so no newDocId's ":" will be added.
if(!pathname) return `${contentUri.rootUri}::${root}${newDocId.startsWith("/") ? newDocId.slice(1) : newDocId}${query}`
return `${contentUri.rootUri}::${root}${newDocId}${query}`;
}
return `${contentUri.rootUri}::${root}:${newDocId}${query}`;
Expand Down
Loading