Skip to content

Commit

Permalink
[Lens] Fix time range issue on save (#123536)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Jan 24, 2022
1 parent 3eded8e commit 9cba74d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions x-pack/plugins/lens/public/app_plugin/mounter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,8 @@ export async function mountApp(
embeddableEditorIncomingState,
initialContext,
};
const emptyState = getPreloadedState(storeDeps) as LensAppState;
const lensStore: LensRootStore = makeConfigureStore(storeDeps, {
lens: emptyState,
lens: getPreloadedState(storeDeps) as LensAppState,
} as PreloadedState<LensState>);

const EditorRenderer = React.memo(
Expand All @@ -208,7 +207,7 @@ export async function mountApp(
if (!initialContext) {
data.query.filterManager.setAppFilters([]);
}
lensStore.dispatch(setState(emptyState));
lensStore.dispatch(setState(getPreloadedState(storeDeps) as LensAppState));
lensStore.dispatch(loadInitial({ redirectCallback, initialInput, history: props.history }));

return (
Expand Down

0 comments on commit 9cba74d

Please sign in to comment.