Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6653d0e

Browse files
committed
fix: type error
1 parent 437849a commit 6653d0e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Repl.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const outputSlotName = computed(() => (props.layoutReverse ? 'left' : 'right'))
7373
provide(injectKeyProps, toRefs(props))
7474
provide(
7575
injectKeyPreviewRef,
76-
computed(() => outputRef.value?.previewRef?.container),
76+
computed(() => outputRef.value?.previewRef?.container ?? null),
7777
)
7878
7979
/**

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ export type OutputModes = 'preview' | EditorMode
1818
export const injectKeyProps: InjectionKey<ToRefs<Required<Props>>> =
1919
Symbol('props')
2020
export const injectKeyPreviewRef: InjectionKey<
21-
ComputedRef<HTMLDivElement | undefined>
21+
ComputedRef<HTMLDivElement | null>
2222
> = Symbol('preview-ref')

0 commit comments

Comments
 (0)