Skip to content
Snippets Groups Projects

Fix: Correctly identify metadata sets

Closed Benedikt Heinrichs requested to merge Hotfix/2601-correctMetadataIdentity into main
1 file
+ 10
3
Compare changes
  • Side-by-side
  • Inline
@@ -30,14 +30,21 @@ export default {
}
}
const typeQueryString = "/@type=metadata";
const resourcesPath = "https://purl.org/coscine/resources/";
if (graphName.indexOf(typeQueryString) !== -1) {
const urlEnd = graphName.substring(
let urlEnd = graphName.substring(
0,
graphName.indexOf(typeQueryString)
);
urlEnd = urlEnd.substring(resourcesPath.length);
if (urlEnd.includes("/")) {
urlEnd = urlEnd.substring(urlEnd.indexOf("/") + 1);
}
if (
urlEnd.endsWith(filterPath) ||
decodeURIComponent(urlEnd).endsWith(filterPath)
urlEnd === filterPath ||
decodeURIComponent(urlEnd) === filterPath ||
urlEnd + "/" === filterPath ||
decodeURIComponent(urlEnd + "/") === filterPath
) {
return true;
}
Loading