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 typo in babel-preset-env #10563

Merged
merged 1 commit into from Oct 16, 2019
Merged

fix typo in babel-preset-env #10563

merged 1 commit into from Oct 16, 2019

Conversation

gera2ld
Copy link
Contributor

@gera2ld gera2ld commented Oct 16, 2019

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

In babel-preset-env, String#italics is incorrectly defined as String#italic for core-js@3.

With a browserslist of defaults, we got the following results:

Case 1: not work because italics is not polyfilled.

// input
console.log('text'.italics());

// output
console.log('text'.italics());

Case 2: still not work because italic is not a function, and the polyfill is useless.

// input
console.log('text'.italic());

// output
import "core-js/modules/es.string.italics";
console.log('text'.italic());

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thanks!

@JLHwung JLHwung merged commit cd5d3ab into babel:master Oct 16, 2019
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jan 15, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 15, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants