diff --git a/www/common/messenger-ui.js b/www/common/messenger-ui.js index 4cbeaf56e..1979bae66 100644 --- a/www/common/messenger-ui.js +++ b/www/common/messenger-ui.js @@ -43,7 +43,7 @@ define([ MessengerUI.create = function ($container, common, toolbar) { var metadataMgr = common.getMetadataMgr(); var origin = metadataMgr.getPrivateData().origin; - var readOnly = metadataMgr.getPrivateData().readOnly || toolbar.readOnly; + var readOnly = metadataMgr.getPrivateData().readOnly || (toolbar && toolbar.readOnly); var isApp = typeof(toolbar) !== "undefined";