From 737bf0882fff8d258761d7e7a755d2521fbdae2a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 16 Aug 2019 14:11:31 -0400 Subject: [PATCH] sending message to tabs has json string obj --- src/browser/browserApi.ts | 2 +- src/content/autofill.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/browserApi.ts b/src/browser/browserApi.ts index f5908cce5f..5f34116abf 100644 --- a/src/browser/browserApi.ts +++ b/src/browser/browserApi.ts @@ -109,7 +109,7 @@ export class BrowserApi { } else if (BrowserApi.isSafariApi) { await SafariApp.sendMessageToApp('tabs_message', JSON.stringify({ tab: tab, - obj: obj, + obj: JSON.stringify(obj), options: options, })); /* diff --git a/src/content/autofill.js b/src/content/autofill.js index 0c9307da3e..568b52d947 100644 --- a/src/content/autofill.js +++ b/src/content/autofill.js @@ -990,7 +990,7 @@ window.__bitwardenFrameId = Math.floor(Math.random() * Math.floor(99999999)); } safari.self.addEventListener('message', function (msgEvent) { - var msg = msgEvent.message; + var msg = JSON.parse(msgEvent.message); if (msg.bitwardenFrameId != null && window.__bitwardenFrameId !== msg.bitwardenFrameId) { return; }