Only show divider between core & custom commands if there are core commands
This commit is contained in:
parent
97e8326768
commit
950b1c2355
1 changed files with 8 additions and 6 deletions
|
|
@ -26,12 +26,14 @@ $(function() {
|
|||
|
||||
self.fromCommandResponse = function(response) {
|
||||
var actions = [];
|
||||
_.each(response.core, function(data) {
|
||||
var action = _.extend({}, data);
|
||||
action.actionSource = "core";
|
||||
actions.push(action);
|
||||
});
|
||||
actions.push({action: "divider"});
|
||||
if (response.core && response.core.length) {
|
||||
_.each(response.core, function(data) {
|
||||
var action = _.extend({}, data);
|
||||
action.actionSource = "core";
|
||||
actions.push(action);
|
||||
});
|
||||
actions.push({action: "divider"});
|
||||
}
|
||||
_.each(response.custom, function(data) {
|
||||
var action = _.extend({}, data);
|
||||
action.actionSource = "custom";
|
||||
|
|
|
|||
Loading…
Reference in a new issue