Merge pull request #1200 from Safelite/feature/CSR-1439.1

CSR-1439 another param bugfix
This commit is contained in:
Matt Caimi 2023-06-30 14:06:30 -04:00 committed by GitHub
commit f811f50c7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,13 +178,14 @@ export default {
},
removeParamsFromEndpoint(endpoint) {
const endpointWithoutParams = endpoint.split("?")[0];
const numSlashesBeforeParams = 6;
let splitString = endpoint.split("/");
let splitString = endpointWithoutParams.split("/");
if (splitString.length > numSlashesBeforeParams) {
splitString = splitString.slice(0, numSlashesBeforeParams);
return splitString.join("/");
} else {
return endpoint;
return endpointWithoutParams;
}
},
},