From 734d4ee41e41ffed59e377c59e19107dfc817de6 Mon Sep 17 00:00:00 2001 From: Edouard Oger Date: Thu, 21 Jul 2016 14:58:19 -0700 Subject: [PATCH] Bug 1288107 - Remove All Devices option in Send Tab to Device menu when we only have 1 other device. r=markh MozReview-Commit-ID: FaqjglxeMCh --HG-- extra : transplant_source : w%9F%CF%C1%C4a%8C%1E%9C%B1%5B%98rl%40%C4.Ne%B2 --- browser/base/content/browser-fxaccounts.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/browser/base/content/browser-fxaccounts.js b/browser/base/content/browser-fxaccounts.js index 5c0fa49c4f74..e092308c1f5a 100644 --- a/browser/base/content/browser-fxaccounts.js +++ b/browser/base/content/browser-fxaccounts.js @@ -407,10 +407,12 @@ var gFxAccounts = { } // "All devices" menu item - const separator = document.createElement("menuseparator"); - fragment.appendChild(separator); - const allDevicesLabel = this.strings.GetStringFromName("sendTabToAllDevices.menuitem"); - addTargetDevice("", allDevicesLabel); + if (clients.length > 1) { + const separator = document.createElement("menuseparator"); + fragment.appendChild(separator); + const allDevicesLabel = this.strings.GetStringFromName("sendTabToAllDevices.menuitem"); + addTargetDevice("", allDevicesLabel); + } devicesPopup.appendChild(fragment); },