Bug 1383848 - Null check library button since it's not there by default. r?jaws
MozReview-Commit-ID: 4IRASZc5icm
--- a/browser/extensions/pocket/content/Pocket.jsm
+++ b/browser/extensions/pocket/content/Pocket.jsm
@@ -1,9 +1,9 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
+ /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
this.EXPORTED_SYMBOLS = ["Pocket"];
@@ -29,17 +29,19 @@ var Pocket = {
},
onPanelViewShowing(event) {
let document = event.target.ownerDocument;
let window = document.defaultView;
let iframe = window.pktUI.getPanelFrame();
let libraryButton = document.getElementById("library-button");
- BrowserUtils.setToolbarButtonHeightProperty(libraryButton);
+ if (libraryButton) {
+ BrowserUtils.setToolbarButtonHeightProperty(libraryButton);
+ }
let urlToSave = Pocket._urlToSave;
let titleToSave = Pocket._titleToSave;
Pocket._urlToSave = null;
Pocket._titleToSave = null;
// ViewShowing fires immediately before it creates the contents,
// in lieu of an AfterViewShowing event, just spin the event loop.
window.setTimeout(function() {