bugfixes creating structs without loading type (e.g. for y-websockets-server)

This commit is contained in:
Kevin Jahns
2016-03-14 19:46:57 +01:00
parent c9c00b5a08
commit f844dcbc1e
5 changed files with 55 additions and 30 deletions

View File

@@ -145,9 +145,10 @@ class YConfig {
throw new Error('Was not able to parse type definition! (share.' + propertyname + ')')
}
}
var id = ['_', propertyname + '_' + typeConstructor]
var type = Y[typeName]
share[propertyname] = yield* this.createType(type.apply(type.typeDefinition, args), id)
var typedef = type.typeDefinition
var id = ['_', typedef.struct + '_' + typeName + '_' + propertyname + '_' + typeConstructor]
share[propertyname] = yield* this.createType(type.apply(typedef, args), id)
}
this.store.whenTransactionsFinished()
.then(callback)