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