Skip to content

Commit

Permalink
Merge pull request #1152 from kzc/1146
Browse files Browse the repository at this point in the history
accomodate incorrect ExportDefaultDeclaration.start produced by rollup-plugin-json
  • Loading branch information
Rich-Harris committed Dec 18, 2016
2 parents dfb8a3f + 2521f2e commit b04e790
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 b04e790

Please sign in to comment.