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

fix: Object.getOwnPropertySymbols called on non-object #10902

Merged
merged 2 commits into from Dec 21, 2019

Conversation

bassaer
Copy link
Contributor

@bassaer bassaer commented Dec 20, 2019

Q                       A
Fixed Issues? Fix related #10482
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

This PR is related to #10683
TypeError: Object.getOwnPropertySymbols called on non-object occurred in android default browser (android 4.x 5.x) when it uses the spread operator.
Because this browser dose not support Object.getOwnPropertySymbols with non-object argument.

スクリーンショット 2019-12-20 23 13 18

@nicolo-ribaudo nicolo-ribaudo added PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Object Rest/Spread labels Dec 20, 2019
@@ -399,7 +399,7 @@ helpers.objectSpread = helper("7.0.0-beta.0")`
var source = (arguments[i] != null) ? arguments[i] : {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we can add Object to arguments[i] and forget about Object(source) later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean like this?

var source = (arguments[i] != null) ?  Object(arguments[i]) : {};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 1366ed3

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@nicolo-ribaudo nicolo-ribaudo merged commit 416ce35 into babel:master Dec 21, 2019
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 22, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Object Rest/Spread
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants