diff --git a/src/browser/browserApi.ts b/src/browser/browserApi.ts index 9f15fe201c..bdf2e7ec39 100644 --- a/src/browser/browserApi.ts +++ b/src/browser/browserApi.ts @@ -156,7 +156,7 @@ export class BrowserApi { return chrome.runtime.getManifest().version; } else if (BrowserApi.isSafariApi) { // TODO - return 'TODO'; + return null; } else { return null; } diff --git a/src/browser/safariApp.ts b/src/browser/safariApp.ts index 43fe17e3e1..47de4fa383 100644 --- a/src/browser/safariApp.ts +++ b/src/browser/safariApp.ts @@ -3,8 +3,11 @@ import { BrowserApi } from './browserApi'; export class SafariApp { static init() { if (BrowserApi.isSafariApi) { - (window as any).bitwardenSafariAppMessageReceiver = (message: any) => + (window as any).bitwardenSafariAppMessageReceiver = (message: any) => { + // tslint:disable-next-line + console.log(message); SafariApp.receiveMessageFromApp(message == null ? null : JSON.parse(message)); + }; } } @@ -19,6 +22,7 @@ export class SafariApp { id: messageId, command: command, data: data, + responseData: null, })); SafariApp.requests.set(messageId, { resolve: resolve, date: now }); }); @@ -31,6 +35,6 @@ export class SafariApp { return; } const p = SafariApp.requests.get(message.id); - p.resolve(message.data); + p.resolve(message.responseData); } }