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

Pass through original code if Babel has ignored #44

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

mehibbs
Copy link
Contributor

@mehibbs mehibbs commented Jun 4, 2019

In Babel v7 when a file has been ignored "transform" returns null (in Babel v6 the original code was returned).
In this case karma-babel-preprocessor errors as it tries to access the property "code" on the null value.

See https://babeljs.io/docs/en/v7-migration-api
"Calls to babel.transform or any other transform function may return null if the file matched an ignore pattern or failed to match an only pattern"

In Babel v7 when a file has been ignored "transform" returns null (in Babel v6 the original code was returned).
In this case karma-babel-preprocessor errors as it tries to access the property "code" on the null value.

See https://babeljs.io/docs/en/v7-migration-api
"Calls to babel.transform or any other transform function may return null if the file matched an ignore pattern or failed to match an only pattern"
@shuhei shuhei merged commit c8768bb into babel:master Jul 11, 2019
@shuhei
Copy link
Member

shuhei commented Jul 11, 2019

Thanks a lot for the fix! Published as 8.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants