fixes tests (#6176)

This commit is contained in:
Joffrey JAFFEUX 2018-07-25 14:02:21 -04:00 committed by GitHub
parent 269baf90cb
commit 6ee1ea96ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -52,6 +52,8 @@ export default Ember.Component.extend({
showAllReportsLink: false,
startDate: null,
endDate: null,
categoryId: null,
groupId: null,
showTrend: false,
showHeader: true,
showTitle: true,
@ -75,7 +77,7 @@ export default Ember.Component.extend({
didReceiveAttrs() {
this._super(...arguments);
const state = this.get("filteringState");
const state = this.get("filteringState") || {};
this.setProperties({
category: Category.findById(state.categoryId),
groupId: state.groupId,
@ -276,7 +278,7 @@ export default Ember.Component.extend({
_renderReport(report, forcedModes, currentMode) {
const modes = forcedModes ? forcedModes.split(",") : report.modes;
currentMode = currentMode || modes[0];
currentMode = currentMode || (modes ? modes[0] : null);
this.setProperties({
model: report,