From cc55171bff62c166e00070080c56e50d12d2f341 Mon Sep 17 00:00:00 2001 From: Thibault Barske Date: Mon, 18 Dec 2023 02:33:55 +0100 Subject: [PATCH] fix(ssr): prevent bug when $refs.container not found children (#127) --- src/vue-horizontal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vue-horizontal.vue b/src/vue-horizontal.vue index 6ac27e3..84dd5ec 100644 --- a/src/vue-horizontal.vue +++ b/src/vue-horizontal.vue @@ -114,7 +114,7 @@ export default Vue.extend({ methods: { children(): HTMLCollection { const container = this.$refs.container as Element - return container.children + return container?.children ?? [] }, findPrevSlot(x: number): Element | undefined { const children = this.children()