mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 10:45:57 +00:00
fixes tests (#6176)
This commit is contained in:
parent
269baf90cb
commit
6ee1ea96ef
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user