Skip to content
Snippets Groups Projects
Commit 58b71ec1 authored by Michele Alberti's avatar Michele Alberti
Browse files

[ivette] Fix selection behavior on shutdown.

parent 0057196e
No related branches found
No related tags found
No related merge requests found
...@@ -676,7 +676,8 @@ function reducer(s: Selection, action: SelectionActions): Selection { ...@@ -676,7 +676,8 @@ function reducer(s: Selection, action: SelectionActions): Selection {
} }
} }
const GlobalSelection = new GlobalStates.State<Selection>({ /** The initial selection is empty. */
const emptySelection = {
current: undefined, current: undefined,
history: { history: {
prevSelections: [], prevSelections: [],
...@@ -686,7 +687,10 @@ const GlobalSelection = new GlobalStates.State<Selection>({ ...@@ -686,7 +687,10 @@ const GlobalSelection = new GlobalStates.State<Selection>({
index: 0, index: 0,
allSelections: [], allSelections: [],
}, },
}); };
const GlobalSelection = new GlobalStates.State<Selection>(emptySelection);
Server.onShutdown(() => GlobalSelection.setValue(emptySelection));
/** /**
Current selection. Current selection.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment