template = this.volcopy.templates[name];
}
- // Changes will have applied to all items.
- const copy = this.context.copyList()[0];
-
this.batchAttrs.forEach(comp => {
if (!comp.hasChanged) { return; }
- const value = copy[comp.name]();
const name = comp.name;
+ const value = this.values[name];
if (value === null) {
delete template[name];
} else {
- // some values are fleshed.
- // this assumes fleshed objects have an 'id' value,
- // which is true so far.
+ // Some values are fleshed. this assumes fleshed objects
+ // have an 'id' value, which is true so far.
template[name] =
typeof value === 'object' ? value.id() : value;
}