CSR-1439 another param bugfix
This commit is contained in:
parent
45c407046b
commit
6fb00ef84d
1 changed files with 3 additions and 2 deletions
|
|
@ -178,13 +178,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
removeParamsFromEndpoint(endpoint) {
|
removeParamsFromEndpoint(endpoint) {
|
||||||
|
const endpointWithoutParams = endpoint.split("?")[0];
|
||||||
const numSlashesBeforeParams = 6;
|
const numSlashesBeforeParams = 6;
|
||||||
let splitString = endpoint.split("/");
|
let splitString = endpointWithoutParams.split("/");
|
||||||
if (splitString.length > numSlashesBeforeParams) {
|
if (splitString.length > numSlashesBeforeParams) {
|
||||||
splitString = splitString.slice(0, numSlashesBeforeParams);
|
splitString = splitString.slice(0, numSlashesBeforeParams);
|
||||||
return splitString.join("/");
|
return splitString.join("/");
|
||||||
} else {
|
} else {
|
||||||
return endpoint;
|
return endpointWithoutParams;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue