Skip to content

Commit 7faf18e

Browse files
Merge pull request #1189 from OskarDamkjaer/fix_clear_favorite_bug
Clear resets favorite
2 parents f301b5f + 69cceca commit 7faf18e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/browser/modules/Editor/EditorFrame.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import {
3535
UIControls,
3636
AnimationContainer
3737
} from './styled'
38-
import { EXPAND, CARDSIZE } from 'shared/modules/editor/editorDuck'
38+
import { EXPAND, SET_CONTENT, CARDSIZE } from 'shared/modules/editor/editorDuck'
3939
import { FrameButton } from 'browser-components/buttons'
4040
import {
4141
ExpandIcon,
@@ -96,8 +96,8 @@ export function EditorFrame({ bus }: EditorFrameProps): JSX.Element {
9696
useEffect(() => bus && bus.take(CARDSIZE, toggleCardView))
9797

9898
function discardEditor() {
99-
editorRef.current && editorRef.current.setValue('')
10099
sizeState !== 'LINE' && setSize('LINE')
100+
bus && bus.send(SET_CONTENT, { message: '' })
101101

102102
setAnimation({
103103
from: stable,

0 commit comments

Comments
 (0)