Skip to content

Commit

Permalink
Fix: No longer break the user session upon encountering some race con…
Browse files Browse the repository at this point in the history
…dition that doesn't impede layout management anyway
  • Loading branch information
monfera committed Feb 14, 2019
1 parent 4042a33 commit 28e3aa3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions x-pack/plugins/canvas/public/lib/aeroelastic_kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ export const aeroelastic = {
},

createStore(initialState, onChangeCallback = () => {}, page) {
if (stores.has(page)) {
throw new Error('Only a single aeroelastic store per page should exist');
}
// if due to a rare race condition, there's a preexisting store for a page, it's OK to just supersede it as
// the stale one just gets garbage collected (stores have only inert data and need no `destroy` calls etc.)

stores.set(page, state.createStore(initialState, onChangeCallback));

Expand Down

0 comments on commit 28e3aa3

Please sign in to comment.