Skip to content

Commit

Permalink
Merge pull request #1405 from plone/issue-1404
Browse files Browse the repository at this point in the history
fix wrong vocabularyUrl lookup when `@@getSource` view is used
  • Loading branch information
petschki authored Nov 8, 2024
2 parents a39677c + c0d30d0 commit 9653ec7
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 9653ec7

Please sign in to comment.