Vue: Uncaught TypeError: Cannot read property 'type' of undefined

Created on 27 Sep 2017  路  1Comment  路  Source: vuejs/vue

Version

2.4.4

Reproduction link

https://jsfiddle.net/kybf1hg0/

Steps to reproduce

Bind a component to in input field while using inline-template.

What is expected?

A proper error message that tells the developer that inline-template components must have exactly one child element.

What is actually happening?

Uncaught TypeError: Cannot read property 'type' of undefined


Hello! :)

There is already a proper error message for this situation. It's just that the check for the number of child elements is implemented as > 1, maybe it should be != 1?

The method "genInlineTemplate" which throws the exception can be found here:
https://github.com/vuejs/vue/blob/94512f3e8cee4030a1096121700ed49afab48073/packages/weex-template-compiler/build.js#L2994

good first issue

Most helpful comment

I can take this one.

>All comments

I can take this one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seemsindie picture seemsindie  路  3Comments

paceband picture paceband  路  3Comments

aviggngyv picture aviggngyv  路  3Comments

finico picture finico  路  3Comments

loki0609 picture loki0609  路  3Comments