Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
#216 fix empty tag array
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Shakhov committed Jul 12, 2017
1 parent 954ac9d commit 084865a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/template/shared/base-template.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class BaseTemplateModel extends BaseModel {
constructor(json) {
super(json);
this.created = moment(json.created).toDate();
this.tags = this.tags.map(tag => new Tag(tag));
this.tags = this.tags ? this.tags.map(tag => new Tag(tag)) : [];
}

public get isTemplate(): boolean {
Expand Down

0 comments on commit 084865a

Please sign in to comment.