chore: comments

This commit is contained in:
cha0s 2019-04-12 00:38:40 -05:00
parent 07ef995e34
commit 54d48c9d72

View File

@ -102,7 +102,7 @@ export class Informed extends decorate(Trait) {
);
});
for (const entityAdd of entityAdds) {
// Remember the entity.
// Remembered entity?
const parts = entityAdd.path.split('/');
parts.shift();
const uuid = parts[4];
@ -110,11 +110,13 @@ export class Informed extends decorate(Trait) {
continue;
}
const rememberedEntity = this._rememberedEntities[uuid];
// Take a diff from what the client remembers to now.
const currentState = state.getIn(parts);
const addSteps = immutablediff(
rememberedEntity,
currentState,
).toJS();
// Translate step paths to full state location.
const fullAddSteps = addSteps.map((addStep) => {
return {
op: addStep.op,