Skip to content

Commit

Permalink
Don’t error if no end date is set
Browse files Browse the repository at this point in the history
  • Loading branch information
solocommand committed Sep 18, 2019
1 parent a3c675c commit 6f356cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default Controller.extend(ImpressionDataMixin, {
endDate: computed('model.criteria.end', function() {
const end = this.get('model.criteria.end');
const now = moment();
if (!end) return now;
return end > now ? now : moment(end);
}),

Expand Down
1 change: 1 addition & 0 deletions app/controllers/portal/campaigns/manage/report/summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default Controller.extend({
endDate: computed('model.criteria.end', function() {
const end = this.get('model.criteria.end');
const now = moment();
if (!end) return now;
return end > now ? now : moment(end);
}),

Expand Down

0 comments on commit 6f356cb

Please sign in to comment.