mirror of
https://github.com/urbit/shrub.git
synced 2024-12-26 05:23:35 +03:00
graph-store: remove-graph in keys
This commit is contained in:
parent
1da21eb3f0
commit
6e18225c5c
@ -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];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user