-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(fix) resolves valid route with grouped chart dashboards #1287
Conversation
Size Change: +7 B (0%) Total Size: 7.52 MB ℹ️ View Unchanged
|
const filteredDashboards = dashboards.filter((dashboard) => { | ||
if ('path' in dashboard) return dashboard; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const filteredDashboards = dashboards.filter((dashboard) => { | |
if ('path' in dashboard) return dashboard; | |
}); | |
const filteredDashboards = dashboards.filter(dashboard => 'path' in dashboard); | |
Question: @pirupius Shouldn't our filter only give a pass for dashboards with a valid path? Like a truthy one?
const filteredDashboards = dashboards.filter(dashboard => dashboard.path);
I think we should also log to console all excluded dashboards and flag them as missing a path
property
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dashboards without paths are mostly flags and other components that necessarily don't appear in the sidenav so there's no need to add a console log
Requirements
Summary
When the patient chart has only folders, the combined array of ungrouped and grouped dashboards has an empty path on index 0 which doesn't resolve. This PR adds a filter to remove dashboards without the
path
key to ensure the index 0 is validScreenshots
Related Issue
Other