Skip to content

Commit

Permalink
fix bug when switching between o11y and security solution
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Aug 31, 2021
1 parent 1368a40 commit da68c5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/security_solution/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
this.storage,
[...(subPlugins.management.store.middleware ?? [])]
);
if (startPlugins.timelines) {
startPlugins.timelines.setTGridEmbeddedStore(this._store);
}
}
if (startPlugins.timelines) {
startPlugins.timelines.setTGridEmbeddedStore(this._store);
}
return this._store;
}
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/timelines/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ export class TimelinesPlugin implements Plugin<void, TimelinesUIStart> {
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,
Expand Down

0 comments on commit da68c5d

Please sign in to comment.