Merge pull request #3999 from LeKeve/lighthouse-trailing-slash

fix(lighthouse plugin): Remove trailing slash from lighthouse audit urls
This commit is contained in:
Ben Lambert
2021-01-11 13:50:19 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-lighthouse': patch
---
Strip trailing slash from url when creating a new audit. This change prevents duplicate audits from being displayed in the audit list.
@@ -79,7 +79,7 @@ export const CreateAuditContent = () => {
// TODO use the id from the response to redirect to the audit page for that id when
// FAILED and RUNNING audits are supported
await lighthouseApi.triggerAudit({
url,
url: url.replace(/\/$/, ''),
options: {
lighthouseConfig: {
settings: {