diff --git a/common/content/commandline.js b/common/content/commandline.js index 42aee812..6dde07db 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -143,7 +143,7 @@ var CommandWidgets = Class("CommandWidgets", { return this.statusbar; let statusElem = this.statusbar.message; - if (value && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth) + if (value && statusElem.editor && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth) return this.commandbar; return this.activeGroup.mode; } diff --git a/common/content/tabs.js b/common/content/tabs.js index af69e406..c34ad6cb 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -55,15 +55,17 @@ var Tabs = Module("tabs", { if (dactyl.has("Gecko2")) { let node = function node(clas) document.getAnonymousElementByAttribute(tab, "class", clas); if (!node("dactyl-tab-number")) { - let nodes = {}; - let dom = util.xmlToDom(.*, document, nodes); let img = node("tab-icon-image"); - img.parentNode.appendChild(dom); - tab.__defineGetter__("dactylOrdinal", function () Number(nodes.icon.value)); - tab.__defineSetter__("dactylOrdinal", function (i) nodes.icon.value = nodes.label.textContent = i); + if (img) { + let nodes = {}; + let dom = util.xmlToDom(.*, document, nodes); + img.parentNode.appendChild(dom); + tab.__defineGetter__("dactylOrdinal", function () Number(nodes.icon.value)); + tab.__defineSetter__("dactylOrdinal", function (i) nodes.icon.value = nodes.label.textContent = i); + } } } tab.setAttribute("dactylOrdinal", i + 1);