Closed GoogleCodeExporter closed 9 years ago
This issue was closed by revision r412.
Original comment by tvcut...@gmail.com
on 10 May 2010 at 1:31
The problem was due to the way Trait.create deals with required properties:
if (pd.required) && !(name in proto)) {
throw new Error('Missing required property: '+name);
} else ...
In this case, properties present in 'proto' will not trigger an Error, but
rather than skipping pd altogether, the
code will continue in the else branch.
Changing the logic as follows fixes this problem:
if (pd.required) {
if (!(name in proto)) {
throw new Error('Missing required property: '+name);
}
Fixed in r412.
Original comment by tvcut...@gmail.com
on 10 May 2010 at 1:33
Original issue reported on code.google.com by
tvcut...@gmail.com
on 10 May 2010 at 1:30