Skip to content

Commit

Permalink
be more leniant in processing ExportDefaultDeclaration (#1146)
Browse files Browse the repository at this point in the history
  • Loading branch information
kzc committed Dec 15, 2016
1 parent fcf3928 commit 2521f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ast/nodes/ExportDefaultDeclaration.js
Expand Up @@ -53,7 +53,7 @@ export default class ExportDefaultDeclaration extends Node {
let declaration_start;
if ( this.declaration ) {
const statementStr = code.original.slice( this.start, this.end );
declaration_start = this.start + statementStr.match(/^export\s+default\s*/)[0].length;
declaration_start = this.start + statementStr.match(/^\s*export\s+default\s+/)[0].length;
}

if ( this.shouldInclude || this.declaration.activated ) {
Expand Down

0 comments on commit 2521f2e

Please sign in to comment.