Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 15, 2023
1 parent 4f693fb commit 598fe9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/histoire-plugin-vue/src/client/app/Story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ export default defineComponent({
if (!props.variant) {
continue
}
if (!vnode.props.initState && !vnode.props['init-state']) {
if (!vnode.props?.initState && !vnode.props?.['init-state']) {
props.initState = this.initState
}
for (const attr in this.$attrs) {
if (typeof vnode.props[attr] === 'undefined') {
if (typeof vnode.props?.[attr] === 'undefined') {
props[attr] = this.$attrs[attr]
}
}
for (const attr in this.story) {
if (!omitInheritStoryProps.includes(attr) && typeof vnode.props[attr] === 'undefined') {
if (!omitInheritStoryProps.includes(attr) && typeof vnode.props?.[attr] === 'undefined') {
props[attr] = this.story[attr]
}
}
Expand Down

0 comments on commit 598fe9b

Please sign in to comment.