Skip to content

triggerRef throw error: Cannot read properties of undefined (reading 'trigger') #11982

@wells1013

Description

@wells1013

Vue version

3.5.6

Link to minimal reproduction

playground

Steps to reproduce

If you run the following code in a non-Vue file, you will get an error

const nextContext = {}, key = 'name';
const ref = Vue.toRef(nextContext, key)
Vue.triggerRef(ref)

The previous version(3.4.27) was good

What is expected?

fix error

What is actually happening?

throw error

TypeError: Cannot read properties of undefined (reading 'trigger')
    at Module.triggerRef (d3336fc2-4575-4884-ad36-b35ade730964:1374:14)
    at AvComponentModel.triggerPropChanged (model.ts:235:11)

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions