Notice that there's no properties field but there is a patternProperties field.
However, when I try to add an object to that node, treema errors out with Uncaught TypeError: Cannot read property '<property>' of undefined with the culprit being in the following generated check on the canAddProperty method (line 3097 on my file):
if (this.workingSchema.properties[key] != null) {
return true;
}
I changed the above check to
if (this.workingSchema.properties && this.workingSchema.properties[key] != null)
and it worked nicely. I don't coffescript so I can't send a PR with the fix.
I have a schema that defines a certain object like this:
Notice that there's no
properties
field but there is apatternProperties
field.However, when I try to add an object to that node, treema errors out with
Uncaught TypeError: Cannot read property '<property>' of undefined
with the culprit being in the following generated check on thecanAddProperty
method (line 3097 on my file):I changed the above check to
and it worked nicely. I don't coffescript so I can't send a PR with the fix.