From c65a7d0a14e2f6b385cac597d8a31081eb9f499a Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Thu, 5 Jan 2023 16:55:33 -0500 Subject: [PATCH] Fix error where removePreview is called without a conversationId --- ts/state/ducks/composer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/state/ducks/composer.ts b/ts/state/ducks/composer.ts index d7e19756aa..5422421373 100644 --- a/ts/state/ducks/composer.ts +++ b/ts/state/ducks/composer.ts @@ -1275,7 +1275,7 @@ export function reducer( })); } - if (action.type === REMOVE_LINK_PREVIEW) { + if (action.type === REMOVE_LINK_PREVIEW && action.payload.conversationId) { return updateComposerState(state, action, () => ({ linkPreviewLoading: false, linkPreviewResult: undefined,