You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using vue-test-utils may cause several messages of the sort
```
[Vue warn]: Error in render: "TypeError: Cannot read property 'template' of null"
```
Such messages stemmed from the `isComponentOptions` method call. It
seems it received a null object and `typeof null` is object, so this
error propagates to users of the library.
This patch does not look for the reason a null object was sent in the
first place, but it avoids the error propagation.
closevuejs#1805
Using vue-test-utils may cause several messages of the sort
```
[Vue warn]: Error in render: "TypeError: Cannot read property 'template' of null"
```
Such messages stemmed from the `isComponentOptions` method call. It
seems it received a null object and `typeof null` is object, so this
error propagates to users of the library.
This patch does not look for the reason a null object was sent in the
first place, but it avoids the error propagation.
close#1805
Subject of the issue
Undesired errors at console during tests run:
[Vue warn]: Error in render: "TypeError: Cannot read property 'template' of null"
Steps to reproduce
Was faced with above issue and found place at code which rises it:
function isComponentOptions(c) {
return typeof c === 'object' && (c.template || c.render)
}
In fact typeof null in JS also returns 'object' - have you expected this guys?)))
Expected behaviour
Suggest to change this place in way:
return !!c && typeof c === 'object' && (c.template || c.render)
Actual behaviour
Tons of errors at console like:
[Vue warn]: Error in render: "TypeError: Cannot read property 'template' of null"
Possible Solution
Haven't found workaround yet.
The text was updated successfully, but these errors were encountered: