Skip to content
This repository has been archived by the owner on May 13, 2018. It is now read-only.

Commit

Permalink
Fixing some errors that were thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed May 31, 2012
1 parent febe9cd commit f693f2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/urlbarbutton.js
Expand Up @@ -30,7 +30,7 @@ UrlbarButton = function (options) {
button, window;

for (window in winUtils.windowIterator()) {
if (!href || href === getPageDocument(window.gBrowser.selectedTab).location.href) {
if (!href || (window.gBrowser && href === getPageDocument(window.gBrowser.selectedTab).location.href)) {
button = window.document.getElementById(options.id);
if (button) {
elements.push(button);
Expand Down Expand Up @@ -136,7 +136,7 @@ UrlbarButton = function (options) {
console.log('LocationChange!');
options.onLocationChange.call(tabbrowser.contentDocument, doc.location.href, visibilityCallback.bind(undefined, doc.location.href));
}
}, Ci.nsIWebProgress.NOTIFY_LOCATION);
});
}
},
onUntrack: function (tabbrowser) {
Expand Down

0 comments on commit f693f2d

Please sign in to comment.