mirror of
https://github.com/discourse/discourse.git
synced 2025-04-28 01:24:33 +08:00
fixes tests (#6176)
This commit is contained in:
parent
269baf90cb
commit
6ee1ea96ef
@ -52,6 +52,8 @@ export default Ember.Component.extend({
|
|||||||
showAllReportsLink: false,
|
showAllReportsLink: false,
|
||||||
startDate: null,
|
startDate: null,
|
||||||
endDate: null,
|
endDate: null,
|
||||||
|
categoryId: null,
|
||||||
|
groupId: null,
|
||||||
showTrend: false,
|
showTrend: false,
|
||||||
showHeader: true,
|
showHeader: true,
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
@ -75,7 +77,7 @@ export default Ember.Component.extend({
|
|||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
const state = this.get("filteringState");
|
const state = this.get("filteringState") || {};
|
||||||
this.setProperties({
|
this.setProperties({
|
||||||
category: Category.findById(state.categoryId),
|
category: Category.findById(state.categoryId),
|
||||||
groupId: state.groupId,
|
groupId: state.groupId,
|
||||||
@ -276,7 +278,7 @@ export default Ember.Component.extend({
|
|||||||
|
|
||||||
_renderReport(report, forcedModes, currentMode) {
|
_renderReport(report, forcedModes, currentMode) {
|
||||||
const modes = forcedModes ? forcedModes.split(",") : report.modes;
|
const modes = forcedModes ? forcedModes.split(",") : report.modes;
|
||||||
currentMode = currentMode || modes[0];
|
currentMode = currentMode || (modes ? modes[0] : null);
|
||||||
|
|
||||||
this.setProperties({
|
this.setProperties({
|
||||||
model: report,
|
model: report,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user