Fix jsx-source to not fail without filename (#6239)
This commit is contained in:
committed by
Henry Zhu
parent
583a875d22
commit
9a0dd4e001
@@ -50,7 +50,7 @@ export default function({ types: t }) {
|
||||
}
|
||||
|
||||
if (!state.fileNameIdentifier) {
|
||||
const fileName = state.file.opts.filename;
|
||||
const fileName = state.file.opts.filename || "";
|
||||
|
||||
const fileNameIdentifier = path.scope.generateUidIdentifier(
|
||||
FILE_NAME_VAR,
|
||||
|
||||
Reference in New Issue
Block a user