Skip to content

Commit

Permalink
fix make-default
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Jun 19, 2017
1 parent 79efe83 commit b343f94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ RocketChat.ChannelSettings = new class {
});
}

getOptions(currentData, group) {
getOptions(currentData = {}, group) {
const allOptions = _.toArray(this.options.get());
const allowedOptions = _.compact(_.map(allOptions, function(option) {
const ret = {...option};
if (option.validation == null || option.validation()) {
option.data = Object.assign({}, typeof option.data === 'function' ? option.data() : option.data, currentData);
return option;
ret.data = Object.assign({}, typeof option.data === 'function' ? option.data() : option.data, currentData);
return ret;
}
})).filter(function(option) {
return !group || !option.group || option.group.includes(group);
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-ui-admin/client/rooms/adminRoomInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Template.adminRoomInfo.helpers({
return room && room.t;
},
channelSettings() {
return RocketChat.ChannelSettings.getOptions(Session.get('adminRoomsSelected'), 'admin-room');
return RocketChat.ChannelSettings.getOptions(undefined, 'admin-room');
},
roomTypeDescription() {
const room = AdminChatRoom.findOne(this.rid, { fields: { t: 1 } });
Expand Down

0 comments on commit b343f94

Please sign in to comment.