Skip to content

Commit

Permalink
[BUGFIX beta] Update DS.Errors#unknownProperty to return undefined.
Browse files Browse the repository at this point in the history
In Ember 3.1+ any object that has an `unknownProperty` will throw an
error if its `unknownProperty` returns any value other than `undefined`
and the property is accessed via `obj.someProperty` (instead of
`obj.get('someProperty')` or `Ember.get(obj, 'someProperty')`).
  • Loading branch information
rwjblue committed Jan 28, 2018
1 parent aec8990 commit 64d5620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/-private/system/model/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default ArrayProxy.extend(Evented, {
*/
unknownProperty(attribute) {
let errors = this.errorsFor(attribute);
if (isEmpty(errors)) { return null; }
if (isEmpty(errors)) { return undefined; }
return errors;
},

Expand Down

0 comments on commit 64d5620

Please sign in to comment.