Skip to content

Commit

Permalink
required attr check only when default === null
Browse files Browse the repository at this point in the history
  • Loading branch information
angus-c committed Sep 12, 2014
1 parent 6128f57 commit 167409a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ define(

for (var key in this.attrDef.prototype) {
if (typeof attrs[key] == 'undefined') {
if (this.attr[key] == null) {
if (this.attr[key] === null) {
throw new Error('Required attribute "' + key +
'" not specified in attachTo for component "' + this.toString() + '".');
}
Expand Down

1 comment on commit 167409a

@giuseppeg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good 1 :)

Please sign in to comment.