Skip to content

Commit

Permalink
fix(descriptors): descriptor options should default to an empty object (
Browse files Browse the repository at this point in the history
#336)

this means that model definition hooks don't have to check everywhere if an attribute or relationship's options are set before checking for individual option properties
  • Loading branch information
acburdine authored and davewasmer committed Jun 19, 2017
1 parent 153257c commit 71b3788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/data/descriptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class Descriptor {
/**
* Creates an instance of Descriptor.
*/
constructor(type: string, options?: any) {
constructor(type: string, options: any = {}) {
this.type = type;
this.options = options;
}
Expand Down

0 comments on commit 71b3788

Please sign in to comment.