From f503693da9b8330de8d8fc2b36305a0be6218c75 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 1 Aug 2007 18:21:08 +0000 Subject: [PATCH] Fix error in browser.js when displaying pages through custom protocol handler --- chrome/content/zotero/browser.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index 5009b7dba..c42bedf15 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -299,14 +299,17 @@ var Zotero_Browser = new function() { } // ignore blacklisted domains - if(doc.domain) { - for each(var blacklistedURL in _blacklist) { - if(doc.domain.substr(doc.domain.length-blacklistedURL.length) == blacklistedURL) { - Zotero.debug("Ignoring blacklisted URL "+doc.location); - return; + try { + if(doc.domain) { + for each(var blacklistedURL in _blacklist) { + if(doc.domain.substr(doc.domain.length-blacklistedURL.length) == blacklistedURL) { + Zotero.debug("Ignoring blacklisted URL "+doc.location); + return; + } } } } + catch (e) {} } // Figure out what browser this contentDocument is associated with