diff --git a/mozilla/suite/common/utilityOverlay.js b/mozilla/suite/common/utilityOverlay.js index b1efae0fdb8..33564d7733a 100644 --- a/mozilla/suite/common/utilityOverlay.js +++ b/mozilla/suite/common/utilityOverlay.js @@ -384,8 +384,10 @@ function goUpdateGlobalEditMenuItems() goUpdateCommand('cmd_delete'); try { // XXX: implement controller for cmd_SwitchTextDirection - document.getElementById('cmd_SwitchTextDirection').setAttribute('disabled', - !document.commandDispatcher.focusedElement); + var changer = document.getElementById('cmd_SwitchTextDirection'); + if (changer) + changer.setAttribute('disabled', + !document.commandDispatcher.focusedElement); } catch (e) {} }