From 5f9b8cab6ccd727167ff18fa4f55924c326c4316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Sun, 15 Oct 2023 13:08:00 +0200 Subject: [PATCH] jsdialog: reduce warnings in console for sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Szymon Kłos Change-Id: Ibe3c82bde06eb96fe08ea977472c776be4132de1 --- browser/src/control/Control.Sidebar.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/browser/src/control/Control.Sidebar.js b/browser/src/control/Control.Sidebar.js index 740de4e9cd31..da7b6e63c3ed 100644 --- a/browser/src/control/Control.Sidebar.js +++ b/browser/src/control/Control.Sidebar.js @@ -59,6 +59,12 @@ L.Control.Sidebar = L.Control.extend({ if (!this.builder) return; + // reduce unwanted warnings in console + if (data.control.id === 'addonimage') { + window.app.console.log('Ignored update for control: ' + data.control.id); + return; + } + this.builder.updateWidget(this.container, data.control); }, @@ -84,7 +90,8 @@ L.Control.Sidebar = L.Control.extend({ // if panel has to be shown or hidden, full update will appear if (controlId === 'contents' || controlId === 'Panel' || - controlId === 'titlebar') { + controlId === 'titlebar' || + controlId === 'addonimage') { window.app.console.log('Ignored action: ' + innerData.action_type + ' for control: ' + controlId); return; }