The Wayback Machine - https://web.archive.org/web/20250523162851/https://github.com/vuejs/vue/issues/5652
Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support using result of Vue.extend in mixins #5652

Copy link
Copy link
Closed
@strantr

Description

@strantr
Issue body actions

Version

2.3.3

Reproduction link

http://jsfiddle.net/zna06rq4/1/

Steps to reproduce

Run fiddle, error will be shown in console:

Error in callback for watcher "hello": "TypeError: this.cb.call is not a function"

What is expected?

"child" should be logged to the console via the watch handler in Child.

What is actually happening?

The watch is not being fired


In strats.watch (

: [child]
) the function unconditionally converts child to an array.
If this has already been converted to an array (via a previous merge operation) it will convert it to a nested array [[child]].

The fix for this seems to be updating line 175 to have:
Array.isArray(child) ? child : [child]

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.