Skip to content

Deep watchers create infinite recursion #60

@dougalg

Description

@dougalg

When using the shim, if you have a deep watcher on a prop that is defined as a VueTypes.* it creates an infinite loop. This is because Vue attempts to look up isRequired which is a getter that returns this. If deep: true is set on the watcher, then it attempts to look at the value returned from isRequired which is the parent object, so it recurses infinitely.

I think the simplest way to resolve this bug is, unfortunately, a breaking change. Change .isRequired to .isRequired(). This way it will return a function, rather than this when it is accessed by Vue.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions