don't add folder breadcrumb if there is no folderUid (#55739)

This commit is contained in:
Ashley Harrison 2022-09-26 14:02:50 +01:00 committed by GitHub
parent d8b4f776aa
commit 1a830e6f45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -433,8 +433,8 @@ function updateStatePageNavFromProps(props: Props, state: State): State {
}
// Check if folder changed
const { folderTitle } = dashboard.meta;
if (folderTitle && pageNav && pageNav.parentItem?.text !== folderTitle) {
const { folderTitle, folderUid } = dashboard.meta;
if (folderTitle && folderUid && pageNav && pageNav.parentItem?.text !== folderTitle) {
pageNav = {
...pageNav,
parentItem: {