fix vbox not recalculating on spec remove
This commit is contained in:
@@ -72,7 +72,7 @@ function InstanceComponent(args) {
|
||||
|
||||
if (!instance) return <div>...</div>;
|
||||
|
||||
const cryps = instance.cryps.map(c => Cryp(c, sendVboxApply, setInfo));
|
||||
const cryps = instance.cryps.map((c, i) => Cryp(c, sendVboxApply, setInfo));
|
||||
|
||||
return (
|
||||
<main className="instance" >
|
||||
|
||||
@@ -54,6 +54,8 @@ function registerEvents(store) {
|
||||
}
|
||||
|
||||
function setPlayer(v) {
|
||||
const { instance } = store.getState();
|
||||
console.log(instance === v);
|
||||
return store.dispatch(actions.setInstance(v));
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ const defaultInstance = null;
|
||||
function instanceReducer(state = defaultInstance, action) {
|
||||
switch (action.type) {
|
||||
case actions.SET_INSTANCE:
|
||||
return action.value;
|
||||
return Object.assign({}, action.value);
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user