new approach for type definitions

This commit is contained in:
Kevin Jahns
2016-03-10 17:49:36 +01:00
parent ba4f444f32
commit d79e3102fc
7 changed files with 121 additions and 64 deletions

View File

@@ -224,6 +224,9 @@ module.exports = function (Y /* :any */) {
var o = ops[i]
if (o.id == null || o.id[0] !== this.y.connector.userId) {
var required = Y.Struct[o.struct].requiredOps(o)
if (o.requires != null) {
required = required.concat(o.requires)
}
this.whenOperationsExist(required, o)
}
}
@@ -372,7 +375,7 @@ module.exports = function (Y /* :any */) {
}
// notify parent, if it was instanciated as a custom type
if (t != null) {
if (t != null && opIsDeleted) {
yield* t._changed(transaction, Y.utils.copyObject(op))
}
}