diff --git a/src/pat/contentbrowser/src/App.svelte b/src/pat/contentbrowser/src/App.svelte index 33dbebe12..c07492bc3 100644 --- a/src/pat/contentbrowser/src/App.svelte +++ b/src/pat/contentbrowser/src/App.svelte @@ -56,7 +56,7 @@ } else { // no path available. try to determine path from vocabularyUrl const vocabPath = new URL(vocabularyUrl).pathname.split("/"); - rootPath = contextPath = $currentPath = vocabPath.slice(0, vocabPath.length - 1).join("/"); + rootPath = contextPath = $currentPath = vocabPath.slice(0, vocabPath.length - 1).join("/") || "/"; } } diff --git a/src/pat/contentbrowser/src/utils.js b/src/pat/contentbrowser/src/utils.js index 395af9861..f62698471 100644 --- a/src/pat/contentbrowser/src/utils.js +++ b/src/pat/contentbrowser/src/utils.js @@ -88,7 +88,7 @@ export async function request({ } }; - let url = `${vocabularyUrl}&query=${JSON.stringify( + let url = `${vocabularyUrl}${vocabularyUrl.indexOf("?") !== -1 ? "&" : "?"}query=${JSON.stringify( vocabQuery )}&attributes=${JSON.stringify(attributes)}&batch=${JSON.stringify({ page: page,