Skip to content
Permalink
Browse files
fix system default semicolon case
  • Loading branch information
guybedford authored and lukastaegert committed May 15, 2018
1 parent 2879bb7 commit f31889263b93d80ba1f1d77cceb2d408f1f8fb20
Showing 4 changed files with 25 additions and 2 deletions.
@@ -114,7 +114,7 @@ export default class ExportDefaultDeclaration extends NodeBase {
}
return;
}
super.render(code, options);
this.declaration.render(code, options);
}

private renderNamedDeclaration(
@@ -158,7 +158,7 @@ export default class ExportDefaultDeclaration extends NodeBase {
`${this.context.varOrConst} ${this.variable.getName()} = ${systemBinding}`
);
if (systemBinding) {
code.appendRight(code.original[this.end - 1] === ';' ? this.end - 1 : this.end, ')');
code.appendLeft(code.original[this.end - 1] === ';' ? this.end - 1 : this.end, ')');
}
}
}
@@ -0,0 +1,8 @@
module.exports = {
description: 'supports asi in system binding output',
options: {
output: {
format: 'system'
}
}
};
@@ -0,0 +1,12 @@
System.register([], function (exports, module) {
'use strict';
return {
execute: function () {

var main = exports('default', typeof global !== "undefined" ? global :
typeof self !== "undefined" ? self :
typeof window !== "undefined" ? window : {})

}
};
});
@@ -0,0 +1,3 @@
export default typeof global !== "undefined" ? global :
typeof self !== "undefined" ? self :
typeof window !== "undefined" ? window : {}

0 comments on commit f318892

Please sign in to comment.