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 jsx-source to not fail without filename #6239

merged 3 commits into from Sep 16, 2017


Copy link

danez commented Sep 13, 2017

Q                       A
Fixed Issues Fixes #5909
Patch: Bug Fix? 👍
Major: Breaking Change?
Minor: New Feature?
Tests Added/Pass?
Spec Compliancy?
License MIT
Doc PR
Any Dependency Changes?

This is an easy fix for the jsx-source transform to not throw in case the filename was not provided.

Should I add a test?


This comment has been minimized.

Copy link

babel-bot commented Sep 13, 2017

Build successful! You can test your changes in the REPL here:

@@ -50,7 +50,8 @@ export default function({ types: t }) {

if (!state.fileNameIdentifier) {
const fileName = state.file.opts.filename;
// Default to an empty string in case no filename was supplied in the transform

This comment has been minimized.

Copy link

hzoo Sep 13, 2017


comment doesn't seem to be necessary?

hzoo approved these changes Sep 13, 2017
Copy link

hzoo left a comment

is it difficult to add a test?


This comment has been minimized.

Copy link

hzoo commented Sep 16, 2017

We should add a test if it's not bad

@hzoo hzoo merged commit 9a0dd4e into master Sep 16, 2017
@hzoo hzoo deleted the danez-patch-2 branch Sep 17, 2017
@lock lock bot added the outdated label Oct 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
3 participants
You can’t perform that action at this time.