Permalink
Browse files

Merge pull request #10 from pdkl95/master

fixed ff-console null errors w/ if(!null) wrappers
  • Loading branch information...
chrispederick committed Jan 8, 2014
2 parents 2a23e96 + f35ef66 commit c0e87cea3267c684c1f503e02589bd67e4a7348d
Showing with 15 additions and 9 deletions.
  1. +15 −9 source/firefox/javascript/overlay/overlay.js
@@ -537,14 +537,18 @@ WebDeveloper.Overlay.setupViewSourceWithKeyboardShortcuts = function(keySet)
// Handles a tab being selected
WebDeveloper.Overlay.tabSelect = function()
{
- // If a feature that uses the element information toolbar is active
- if(WebDeveloper.Dashboard.isOpenInDashboard(WebDeveloper.Locales.getString("elementInformation")) || WebDeveloper.Dashboard.isOpenInDashboard(WebDeveloper.Locales.getString("styleInformation")))
- {
- document.getElementById("web-developer-element-information-toolbar").hidden = false;
- }
- else
- {
- document.getElementById("web-developer-element-information-toolbar").hidden = true;
+ var el = document.getElementById("web-developer-element-information-toolbar");
+
+ if (el) {
+ // If a feature that uses the element information toolbar is active
+ if(WebDeveloper.Dashboard.isOpenInDashboard(WebDeveloper.Locales.getString("elementInformation")) || WebDeveloper.Dashboard.isOpenInDashboard(WebDeveloper.Locales.getString("styleInformation")))
+ {
+ el.hidden = false;
+ }
+ else
+ {
+ el.hidden = true;
+ }
}
WebDeveloper.Overlay.resetCSSStatus();
@@ -826,7 +830,9 @@ WebDeveloper.Overlay.updateJavaScriptStatus = function(error)
// Updates meta redirects
WebDeveloper.Overlay.updateMetaRedirects = function(browserElement)
{
- browserElement.docShell.allowMetaRedirects = !WebDeveloper.Preferences.getExtensionBooleanPreference("meta.redirects.disable");
+ if (browserElement) {
+ browserElement.docShell.allowMetaRedirects = !WebDeveloper.Preferences.getExtensionBooleanPreference("meta.redirects.disable");
+ }
};
// Updates the render mode status button

0 comments on commit c0e87ce

Please sign in to comment.