Skip to content

Commit

Permalink
Update the documentation url path to read from metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
kmannuru committed Dec 20, 2024
1 parent bf83325 commit 8598ef1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/app/panel/tabs/linting/LintingTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function LintingTabItem(props) {

const {
category,
documentation = {},
meta = {},
message,
rule
} = report;
Expand All @@ -109,7 +109,7 @@ function LintingTabItem(props) {
</div>;
}

const { url: documentationUrl = null } = documentation;
const documentationUrl = meta?.documentation?.url;
const reportName = getReportName(report);

return <div
Expand Down
6 changes: 4 additions & 2 deletions client/src/app/panel/tabs/linting/__tests__/LintingTabSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ describe('<LintingTab>', function() {
name: 'Foo',
message: 'Foo message',
rule: 'foo-rule',
documentation: {
url: 'https://foo.bar'
meta: {
documentation: {
url: 'https://foo.bar'
}
}
}
]
Expand Down

0 comments on commit 8598ef1

Please sign in to comment.