NewNavigation: Fix failing e2e test (#45779)

This commit is contained in:
kay delaney 2022-02-23 14:47:56 +00:00 committed by GitHub
parent 2f0dcbbd9d
commit 043c1be572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { NavModelItem } from '@grafana/data';
import config from 'app/core/config';
const defaultPins = (config.bootData.navTree as NavModelItem[]).map((n) => n.id).join(',');
const defaultPins = ((config.bootData?.navTree as NavModelItem[]) ?? []).map((n) => n.id).join(',');
const storedPins = (window.localStorage.getItem('pinnedNavItems') ?? defaultPins).split(',');
export const initialState: NavModelItem[] = ((config.bootData?.navTree ?? []) as NavModelItem[]).map(