Skip to content

Commit 797512b

Browse files
committed
fix: use $props instead of Vue 2 vnode.componentOptions.propsData
componentOptions.propsData does not exist in Vue 3 vnodes. Access component props directly via $props instead. Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
1 parent 61b3f48 commit 797512b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/mixins/QuestionMultipleMixin.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,10 @@ export default defineComponent({
102102
*/
103103
focusIndex(index: number, optionType: string) {
104104
// refs are not guaranteed to be in correct order - we need to find the correct item
105-
const item = this.$refs.input.find(({ $vnode: vnode }) => {
106-
const propsData = vnode?.componentOptions.propsData
107-
105+
const item = this.$refs.input.find((instance) => {
108106
return (
109-
propsData.optionType === optionType && propsData?.index === index
107+
instance.$props.optionType === optionType
108+
&& instance.$props.index === index
110109
)
111110
})
112111
if (item) {

0 commit comments

Comments
 (0)