fix: missing object in dashboard expand panel getter

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2022-03-06 17:06:47 +01:00
parent dc903bf183
commit 81ca4192b9
No known key found for this signature in database
GPG Key ID: 5D3A5823133D2246

View File

@ -26,9 +26,11 @@ export const getters: GetterTree<GuiState, any> = {
},
getPanelExpand: (state) => (name: string, viewport: string) => {
if (!(viewport in state.dashboard.nonExpandPanels)) return true
if ('dashboard' in state && viewport in state.dashboard.nonExpandPanels) {
return !state.dashboard.nonExpandPanels[viewport].includes(name) ?? true
}
return !state.dashboard.nonExpandPanels[viewport].includes(name) ?? true
return true
},
getPanels: (state, getters, rootState) => (viewport: string) => {