Skip to content

Commit

Permalink
Merge pull request #1351 from cassproject/ce-1343
Browse files Browse the repository at this point in the history
obo error when trimming relation url
  • Loading branch information
gloverkari authored Mar 20, 2024
2 parents 740018c + 74b483b commit abfc27a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/modules/lode.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ function trimUrl(url) {
}
let trimmed = url;
if (trimmed["@value"] && typeof trimmed["@value"] === "string" && trimmed["@value"].endsWith("/")) {
trimmed["@value"] = trimmed["@value"].slice(0, trimmed["@value"].length - 2);
trimmed["@value"] = trimmed["@value"].slice(0, trimmed["@value"].length - 1);
}
if (trimmed["@value"] && typeof trimmed["@value"] === "string" && trimmed["@value"].startsWith("/")) {
trimmed["@value"] = trimmed["@value"].slice(1);
}
if (trimmed && typeof trimmed === "string" && trimmed.endsWith("/")) {
trimmed = trimmed.slice(0, trimmed.length - 2);
trimmed = trimmed.slice(0, trimmed.length - 1);
}
if (trimmed && typeof trimmed === "string" && trimmed.startsWith("/")) {
trimmed = trimmed.slice(1);
Expand Down

0 comments on commit abfc27a

Please sign in to comment.