From d991eab87e90dfa36c06129db4320036f64b290b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 18 Nov 2016 15:01:53 +0100 Subject: [PATCH] Only insert divider in system menu if there are custom commands --- src/octoprint/static/js/app/viewmodels/system.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/octoprint/static/js/app/viewmodels/system.js b/src/octoprint/static/js/app/viewmodels/system.js index 7973a6cf..307e1c0f 100644 --- a/src/octoprint/static/js/app/viewmodels/system.js +++ b/src/octoprint/static/js/app/viewmodels/system.js @@ -28,7 +28,9 @@ $(function() { action.actionSource = "core"; actions.push(action); }); - actions.push({action: "divider"}); + if (response.custom && response.custom.length) { + actions.push({action: "divider"}); + } } _.each(response.custom, function(data) { var action = _.extend({}, data);