From da68c5db89babf7da6ef13189728bb62865cffc6 Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau <189600+XavierM@users.noreply.github.com> Date: Tue, 31 Aug 2021 08:54:54 -0400 Subject: [PATCH] fix bug when switching between o11y and security solution --- x-pack/plugins/security_solution/public/plugin.tsx | 6 +++--- x-pack/plugins/timelines/public/plugin.ts | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index 76ed4f4c00062..93fa70ddd9bfb 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -427,9 +427,9 @@ export class Plugin implements IPlugin { return getHoverActions(this._store!); }, getTGrid: (props: TGridProps) => { + if (props.type === 'standalone' && this._store) { + const { getState } = this._store; + const state = getState(); + if (state && state.app) { + this._store = undefined; + } + } return getTGridLazy(props, { store: this._store, storage: this._storage,