1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-07 09:31:31 +01:00

sending message to tabs has json string obj

This commit is contained in:
Kyle Spearrin 2019-08-16 14:11:31 -04:00
parent f4dbf92e66
commit 737bf0882f
2 changed files with 2 additions and 2 deletions

View File

@ -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,
}));
/*

View File

@ -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;
}