From 85a31335e2d4790ab1f4d17f610784c0bcb9d4fe Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 4 May 2018 18:24:47 +0300 Subject: [PATCH] [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(-) diff --git a/toolkit/jetpack/sdk/ui/buttons.js b/toolkit/jetpack/sdk/ui/buttons.js index 66e0fd742d..6aaed3865d 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;