diff --git a/modules/browserUIShowHideObserver.js b/modules/browserUIShowHideObserver.js index a92659af..31f3ac4b 100644 --- a/modules/browserUIShowHideObserver.js +++ b/modules/browserUIShowHideObserver.js @@ -144,10 +144,10 @@ BrowserUIShowHideObserver.prototype = { serializeBoxState : function BrowserUIShowHideObserver_serializeBoxState(aElement) { aElement = aElement || this.box; - var box = aElement.boxObject; + var box = aElement.boxObject || {}; // Some times there is no boxObject (ex. HTML element) return JSON.stringify({ - width : box.width, - height : box.height, + width : box.width || 0, + height : box.height || 0, hidden : Boolean(aElement.hidden), collapsed : Boolean(aElement.collapsed) });