From e401be6fb2a48d6c1191d794495412aa2ef20724 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Mon, 26 Sep 2022 07:58:51 -0700 Subject: [PATCH] fix block scoping error for message object creation --- .../web/components/templates/article/HighlightsLayer.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/web/components/templates/article/HighlightsLayer.tsx b/packages/web/components/templates/article/HighlightsLayer.tsx index f48007b59..44235fb13 100644 --- a/packages/web/components/templates/article/HighlightsLayer.tsx +++ b/packages/web/components/templates/article/HighlightsLayer.tsx @@ -349,11 +349,12 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element { } break case 'share': + const message = { + actionID: 'share', + highlightID: focusedHighlight?.id, + } + if (props.isAppleAppEmbed) { - const message = { - actionID: 'share', - highlightID: focusedHighlight?.id, - } window?.webkit?.messageHandlers.highlightAction?.postMessage( message )