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()