Skip to content

Commit

Permalink
Fix assumption of declaration property on export (benjamn#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanAnnable authored and benjamn committed Jul 18, 2016
1 parent dc79e98 commit 2ad8a66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ util.getTrueLoc = function(node, lines) {
// If the node is an export declaration and its .declaration has any
// decorators, their locations might contribute to the true start/end
// positions of the export declaration node.
if (util.isExportDeclaration(node) &&
if (node.declaration && util.isExportDeclaration(node) &&
node.declaration.decorators) {
node.declaration.decorators.forEach(include);
}
Expand Down

0 comments on commit 2ad8a66

Please sign in to comment.