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

Object rest syntax not transpiling correctly with dynamic properties #9834

noahgrant opened this Issue Apr 8, 2019 · 3 comments


None yet
2 participants
Copy link

commented Apr 8, 2019

Bug Report

Current Behavior
Assigning object values to dynamic variables while using object rest syntax results in transpiling code that looks like:

// dynamic properties to be omitted from initialObject are simply undefined
_objectWithoutProperties(initialObject, ["undefined"]);

Input Code

Expected behavior/code
As you can see at the REPL link above, babel tries to remove 'undefined' properties from the initialObject, resulting in rest containing all of the initialObject's properties. If you were to paste that code into chrome devtools, rest would correctly only contain familyGuy.

Babel Configuration (.babelrc, package.json, cli command)

The config is built-in to the REPL at the link above, but the preset-env is using the following browsers:

Chrome >= 67, Firefox >= 63, Edge >= 17, Opera >= 57, Safari >= 11.1


  • Babel version(s): 7.4
  • How you are using Babel: REPL



This comment has been minimized.

Copy link

commented Apr 8, 2019

Hey @noahgrant! 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
that typically always has someone willing to help. You can sign-up here
for an invite.


This comment has been minimized.

Copy link

commented Apr 8, 2019

I'd just like to add that I changed my Edge requirements to >= 18 and it was transpiled correctly.


This comment has been minimized.

Copy link

commented Apr 24, 2019

related question—using Edge 17 also transpiled default function parameters, but I thought Edge 17 was supposed to be fully ES2015-compliant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.