-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue does not accept undefined values when returning an array in functional component #7282
Closed
sqal opened this issue
Dec 19, 2017
· 1 comment
· Fixed by annict/annict#1034, annict/annict#1035, owncloud/web#46, OSM-Browser/osm-browser#56 or OSM-Browser/osm-browser#58
Closed
Vue does not accept undefined values when returning an array in functional component #7282
sqal opened this issue
Dec 19, 2017
· 1 comment
· Fixed by annict/annict#1034, annict/annict#1035, owncloud/web#46, OSM-Browser/osm-browser#56 or OSM-Browser/osm-browser#58
Labels
Comments
The array must contain vnodes, so only things created with |
lovelope
pushed a commit
to lovelope/vue
that referenced
this issue
Feb 1, 2018
This was referenced Mar 14, 2018
f2009
pushed a commit
to f2009/vue
that referenced
this issue
Jan 25, 2019
aJean
pushed a commit
to aJean/vue
that referenced
this issue
Aug 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
2.5.11
Reproduction link
https://jsfiddle.net/qL80y6oL/
Steps to reproduce
Check console log.
What is expected?
Should render input element
What is actually happening?
When functional component returns an array and the array contains other values besides vnodes like e.g. null or undefined Vue will not render anything and throw an error.
I checked this in few previous versions and it seems that it never worked correctly. In 2.5.9 I get a different warning "Cannot set property 'isRootInsert' of null". So the question is. Is this a case that should be handled by Vue internally, or do I have to be careful and not to return null/undefined values in returned array.
The text was updated successfully, but these errors were encountered: