Skip to content

Commit

Permalink
issue/#2035: bug in setActiveItem when no item active (#2036)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored and moloko committed Apr 16, 2018
1 parent 96054c3 commit 6b61c80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/js/models/itemsComponentModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ define([
},

setActiveItem: function(index) {
this.getActiveItem().toggleActive(false);
var activeItem = this.getActiveItem();
if (activeItem) activeItem.toggleActive(false);
this.getItem(index).toggleActive(true);
}

Expand Down

0 comments on commit 6b61c80

Please sign in to comment.