Skip to content

Commit

Permalink
Throw invariant error
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Aug 28, 2020
1 parent 929f3ce commit 01b4fcc
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -439,6 +439,13 @@ You can set \`throwIfNamespace: false\` to bypass this warning.`,
}

function makeSource(path, state) {
const location = path.node.loc;
if (!location) {
throw path.buildCodeFrameError(
"invariant: `makeSource` cannot return source information for generated paths. This is likely a bug with `@babel/helper-builder-react-jsx-experimental`.",
);
}

if (!state.fileNameIdentifier) {
const { filename = "" } = state;

Expand Down

0 comments on commit 01b4fcc

Please sign in to comment.