mirror of
https://github.com/directus/directus.git
synced 2026-01-23 11:47:59 -05:00
Rely on undefined check for #583
This commit is contained in:
@@ -59,7 +59,7 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
const markdown = ref('');
|
||||
const view = ref<Vue | null>(null);
|
||||
const view = ref<Vue>();
|
||||
|
||||
const title = computed(() => {
|
||||
const firstLine = markdown.value.split('\n').shift();
|
||||
@@ -73,8 +73,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
onUpdated(() => {
|
||||
if(view.value === null) return
|
||||
view.value.$data.contentEl?.scrollTo({ top: 0 });
|
||||
view.value?.$data.contentEl?.scrollTo({ top: 0 });
|
||||
});
|
||||
|
||||
return { markdown, title, markdownWithoutTitle, view };
|
||||
|
||||
Reference in New Issue
Block a user