From 69cceca033c279c4142c3ff46130b941788273b1 Mon Sep 17 00:00:00 2001 From: Oskar Damkjaer Date: Mon, 7 Sep 2020 10:12:16 +0200 Subject: [PATCH] Clear resets favorite --- src/browser/modules/Editor/EditorFrame.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/modules/Editor/EditorFrame.tsx b/src/browser/modules/Editor/EditorFrame.tsx index b11478f6ff2..26131c3ca9c 100644 --- a/src/browser/modules/Editor/EditorFrame.tsx +++ b/src/browser/modules/Editor/EditorFrame.tsx @@ -35,7 +35,7 @@ import { UIControls, AnimationContainer } from './styled' -import { EXPAND, CARDSIZE } from 'shared/modules/editor/editorDuck' +import { EXPAND, SET_CONTENT, CARDSIZE } from 'shared/modules/editor/editorDuck' import { FrameButton } from 'browser-components/buttons' import { ExpandIcon, @@ -96,8 +96,8 @@ export function EditorFrame({ bus }: EditorFrameProps): JSX.Element { useEffect(() => bus && bus.take(CARDSIZE, toggleCardView)) function discardEditor() { - editorRef.current && editorRef.current.setValue('') sizeState !== 'LINE' && setSize('LINE') + bus && bus.send(SET_CONTENT, { message: '' }) setAnimation({ from: stable,