diff --git a/src/Common/MessageHandler.ts b/src/Common/MessageHandler.ts index 98b912d44..f89ccf9ea 100644 --- a/src/Common/MessageHandler.ts +++ b/src/Common/MessageHandler.ts @@ -2,6 +2,7 @@ import { MessageTypes } from "../Contracts/ExplorerContracts"; import Q from "q"; import * as _ from "underscore"; import * as Constants from "./Constants"; +import { config, Platform } from "../Config"; export interface CachedDataPromise { deferred: Q.Deferred; @@ -59,7 +60,7 @@ export function sendMessage(data: any): void { } export function canSendMessage(): boolean { - return window.parent !== window; + return config.platform === Platform.Portal && window.parent !== window; } // TODO: This is exported just for testing. It should not be. diff --git a/src/Explorer/Explorer.ts b/src/Explorer/Explorer.ts index 92a7aaf8b..e6d28dbb5 100644 --- a/src/Explorer/Explorer.ts +++ b/src/Explorer/Explorer.ts @@ -2606,7 +2606,11 @@ export default class Explorer { private async _refreshNotebooksEnabledStateForAccount(): Promise { const authType = window.authType as AuthType; - if (authType === AuthType.EncryptedToken || authType === AuthType.ResourceToken) { + if ( + authType === AuthType.EncryptedToken || + authType === AuthType.ResourceToken || + authType === AuthType.MasterKey + ) { this.isNotebooksEnabledForAccount(false); return; }