Skip to content

Commit 8b362a0

Browse files
committed
fix(snippets): delete fragment
1 parent 238388d commit 8b362a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/renderer/App.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ watch(
141141
watch(
142142
() => [snippetStore.selectedId, snippetStore.fragment],
143143
() => {
144-
if (
145-
snippetStore.selected?.content[snippetStore.fragment].language !==
146-
'markdown'
147-
) {
144+
const lang = snippetStore.selected?.content[snippetStore.fragment]?.language
145+
146+
if (lang && lang !== 'markdown') {
148147
snippetStore.isMarkdownPreview = false
148+
snippetStore.isMindmapPreview = false
149149
}
150150
}
151151
)

0 commit comments

Comments
 (0)