Skip to content

Commit bb1447b

Browse files
committed
fixed bug that assumed minichartModel is always set
1 parent 4172472 commit bb1447b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scout-ui/src/field-list/type-list-item.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ module.exports = AmpersandView.extend({
5050
},
5151
template: require('./type-list-item.jade'),
5252
typeClicked: function() {
53-
if (this.parent.parent.minichartModel.modelType !== this.model.modelType) {
54-
this.parent.parent.switchView(this.model);
53+
var fieldList = this.parent.parent;
54+
if (!fieldList.minichartModel || (fieldList.minichartModel.modelType !== this.model.modelType)) {
55+
fieldList.switchView(this.model);
5556
}
5657
}
5758

0 commit comments

Comments
 (0)