Skip to content

Commit

Permalink
fix(pat contentbrowser): fix wrong vocabularyUrl lookup when `@@getSo…
Browse files Browse the repository at this point in the history
…urce` view is used.
  • Loading branch information
petschki committed Nov 8, 2024
1 parent a39677c commit c0d30d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pat/contentbrowser/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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("/") || "/";
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/pat/contentbrowser/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c0d30d0

Please sign in to comment.