From d855b2e69693b719d4543af30353cb24d2419aca Mon Sep 17 00:00:00 2001 From: Patryk Klatka Date: Mon, 29 Apr 2024 17:33:25 +0200 Subject: [PATCH] feat: change strada script --- packages/turbo/src/hooks/useStradaBridge.ts | 2 +- packages/turbo/src/utils/stradaBridgeScript.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/turbo/src/hooks/useStradaBridge.ts b/packages/turbo/src/hooks/useStradaBridge.ts index 961cd7a7..6f3e42ae 100644 --- a/packages/turbo/src/hooks/useStradaBridge.ts +++ b/packages/turbo/src/hooks/useStradaBridge.ts @@ -38,7 +38,7 @@ export const useStradaBridge = ( dispatchCommand( visitableViewRef, 'injectJavaScript', - `window.nativeBridge.replyWith('${JSON.stringify(message)}')` + `window.nativeBridge.replyWith(${JSON.stringify(message)})` ), [dispatchCommand, visitableViewRef] ); diff --git a/packages/turbo/src/utils/stradaBridgeScript.ts b/packages/turbo/src/utils/stradaBridgeScript.ts index 215a8204..44269145 100644 --- a/packages/turbo/src/utils/stradaBridgeScript.ts +++ b/packages/turbo/src/utils/stradaBridgeScript.ts @@ -63,7 +63,7 @@ export const stradaBridgeScript = ` // Reply to web with message replyWith(message) { if (this.isStradaAvailable) { - this.webBridge.receive(JSON.parse(message)); + this.webBridge.receive(message); } }