Skip to content

Cleanup: Use Object.assign() to create shallow copies #2647

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

Merged
merged 2 commits into from
Feb 20, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

No description provided.

@schmidt-sebastian
Copy link
Contributor Author

Hmm. This breaks IE :/

}
}
return result;
return Object.assign({}, obj);
Copy link
Member

Choose a reason for hiding this comment

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

or even shorter

return {...obj}

@Feiyang1
Copy link
Member

We don't worry about breaking IE with new ES features. We ask developers to include polyfills for older browsers in https://firebase.google.com/support/guides/environments_js-sdk

@schmidt-sebastian schmidt-sebastian merged commit 4c2f8d1 into master Feb 20, 2020
@firebase firebase locked and limited conversation to collaborators Mar 22, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/shallowcopy branch April 6, 2020 19:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants