Browse Source

Merge pull request #1152 from kzc/1146

accomodate incorrect ExportDefaultDeclaration.start produced by rollup-plugin-json
gh-1132
Rich Harris 8 years ago
committed by GitHub
parent
commit
b04e790c4d
  1. 2
      src/ast/nodes/ExportDefaultDeclaration.js

2
src/ast/nodes/ExportDefaultDeclaration.js

@ -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 ) {

Loading…
Cancel
Save