diff --git a/public/app/features/dashboard/components/PanelEditor/state/reducers.ts b/public/app/features/dashboard/components/PanelEditor/state/reducers.ts index 9503099a219..0f59347dc23 100644 --- a/public/app/features/dashboard/components/PanelEditor/state/reducers.ts +++ b/public/app/features/dashboard/components/PanelEditor/state/reducers.ts @@ -37,6 +37,14 @@ export interface PanelEditorState { } export const initialState = (): PanelEditorState => { + const storedUiState = store.getObject(PANEL_EDITOR_UI_STATE_STORAGE_KEY, DEFAULT_PANEL_EDITOR_UI_STATE); + + let migratedState = { ...storedUiState }; + + if (typeof storedUiState.rightPaneSize === 'string') { + migratedState = { ...storedUiState, rightPaneSize: parseFloat(storedUiState.rightPaneSize) / 100 }; + } + return { getPanel: () => new PanelModel({}), getSourcePanel: () => new PanelModel({}), @@ -50,7 +58,7 @@ export const initialState = (): PanelEditorState => { isOpen: false, ui: { ...DEFAULT_PANEL_EDITOR_UI_STATE, - ...store.getObject(PANEL_EDITOR_UI_STATE_STORAGE_KEY, DEFAULT_PANEL_EDITOR_UI_STATE), + ...migratedState, }, }; };