From ef2dae888567bd661d500f5a492a7a1df66c4021 Mon Sep 17 00:00:00 2001 From: Amine Mouafik Date: Thu, 27 Feb 2020 16:08:30 +0100 Subject: Do not include debug menu items when locked It has to stay here, can't include it in the previous similar condition block without breaking things with the current implementation. --- src/lib/Menu.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lib/Menu.js') diff --git a/src/lib/Menu.js b/src/lib/Menu.js index cd2ebaef5..56276ce2d 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js @@ -983,10 +983,11 @@ export default class FranzMenu { tpl[5].submenu = this.todosMenu(); } - tpl[tpl.length - 1].submenu.push({ - type: 'separator', - }, ...this.debugMenu()); - + if (!this.stores.settings.app.locked) { + tpl[tpl.length - 1].submenu.push({ + type: 'separator', + }, ...this.debugMenu()); + } this.currentTemplate = tpl; const menu = Menu.buildFromTemplate(tpl); Menu.setApplicationMenu(menu); -- cgit v1.2.3-54-g00ecf