From 32949bf64bb7aa166913af6b91969788b403c847 Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 4 May 2018 18:24:47 +0300 Subject: [PMkit] Fix Empty string passed to getElementById() warning in buttons.js --- toolkit/jetpack/sdk/ui/buttons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolkit/jetpack/sdk/ui/buttons.js') diff --git a/toolkit/jetpack/sdk/ui/buttons.js b/toolkit/jetpack/sdk/ui/buttons.js index 66e0fd742..6aaed3865 100644 --- a/toolkit/jetpack/sdk/ui/buttons.js +++ b/toolkit/jetpack/sdk/ui/buttons.js @@ -50,7 +50,7 @@ function insertButton(aWindow, id, onBuild) { let toolbar = toolbarId != "" && doc.getElementById(toolbarId); if (toolbar) { - let nextItem = doc.getElementById(nextItemId); + let nextItem = nextItemId != "" && doc.getElementById(nextItemId); // If nextItem not in toolbar then retrieve it by reading currentset attribute if (!(nextItem && nextItem.parentNode && nextItem.parentNode.id == toolbarId)) { nextItem = null; -- cgit v1.2.3