graph-store: remove-graph in keys

This commit is contained in:
Liam Fitzgerald 2020-12-11 16:07:19 +10:00
parent 1da21eb3f0
commit 6e18225c5c
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -75,10 +75,12 @@ const addGraph = (json, state) => {
const removeGraph = (json, state) => { const removeGraph = (json, state) => {
const data = _.get(json, 'remove-graph', false); const data = _.get(json, 'remove-graph', false);
if (data) { if (data) {
if (!('graphs' in state)) { if (!('graphs' in state)) {
state.graphs = {}; state.graphs = {};
} }
let resource = data.ship + '/' + data.name; let resource = data.ship + '/' + data.name;
state.graphKeys.delete(resource);
delete state.graphs[resource]; delete state.graphs[resource];
} }
}; };