Skip to content

Commit

Permalink
fix(ssr): prevent bug when $refs.container not found children (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
tibs245 committed Dec 18, 2023
1 parent 02e24a6 commit cc55171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vue-horizontal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cc55171

Please sign in to comment.