Skip to content

Commit

Permalink
fix: Avoid throwing exceptions to extension container on empty selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ob1 committed Jul 26, 2018
1 parent 54048fb commit cc94be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function isJSX(code) {
}
}

return ast.expression && t.isJSX(ast.expression);
return ast && ast.expression && t.isJSX(ast.expression);
}

function capitalizeFirstLetter(string) {
Expand Down

0 comments on commit cc94be7

Please sign in to comment.