Skip to content
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

Cannot convert undefined or null to object #9376

Closed
ycjcl868 opened this issue Jan 22, 2019 · 12 comments · Fixed by #9379
Closed

Cannot convert undefined or null to object #9376

ycjcl868 opened this issue Jan 22, 2019 · 12 comments · Fixed by #9379
Assignees
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue Spec: Object Rest/Spread

Comments

@ycjcl868
Copy link

ycjcl868 commented Jan 22, 2019

Bug Report

image

bug version: @babel/runtime 7.3.0, #9334

@babel-bot
Copy link
Collaborator

Hey @ycjcl868! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community
that typically always has someone willing to help. You can sign-up here
for an invite.

@yesmeck
Copy link

yesmeck commented Jan 22, 2019

It seems that the 7.3.0 release of @babel/runtime don't allow spreading an undefined value now.

dead-horse pushed a commit to cnpm/bug-versions that referenced this issue Jan 22, 2019
@gera2ld
Copy link
Contributor

gera2ld commented Jan 22, 2019

It breaks everything!
image

@danez
Copy link
Member

danez commented Jan 22, 2019

Thanks for reporting. I will have a look now.

@danez
Copy link
Member

danez commented Jan 22, 2019

Does anyone have a simple example of a spread that I can use to reproduce this?

@yoyo837
Copy link

yoyo837 commented Jan 22, 2019

@ycjcl868 Hey guy, are you using dva? it looks like a version conflict.

dvajs/dva#1998

@yesmeck
Copy link

yesmeck commented Jan 22, 2019

We can confirm it's a version conflict of https://github.com/umijs/umi. @danez Thanks for your reply.

@feiyingx
Copy link

how do you resolve the version conflect @yesmeck

@yesmeck
Copy link

yesmeck commented Jan 22, 2019

@feiyingx See umijs/umi#1888

@loganfsmyth loganfsmyth reopened this Jan 22, 2019
@loganfsmyth
Copy link
Member

Reopening this because it seems like a legitimate regression on our side. The runtime is supposed to stay compatible.

@gera2ld
Copy link
Contributor

gera2ld commented Jan 22, 2019

I don't think this is a version conflict since it breaks all code that depends on @babel/runtime@~7.2.0.
Should every third-party library pack a copy of @babel/runtime with it in the future?

@yesmeck
Copy link

yesmeck commented Jan 22, 2019

https://github.com/yesmeck/babel-spread-undefined

Here is a reproduction. It seems @babel/runtime@7.3.0 not compatible with "@babel/plugin-proposal-object-rest-spread@7.2.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue Spec: Object Rest/Spread
Projects
None yet
8 participants