File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,10 @@ export class TraceurLoader extends Loader {
63
63
load . metadata . traceurOptions = load . metadata . traceurOptions || { } ;
64
64
var options = load . metadata . traceurOptions ;
65
65
var asJS ;
66
- if ( options && options . script ) {
66
+ if ( / \. j s $ / . test ( normalizedModuleName ) || options && options . script ) {
67
67
asJS = normalizedModuleName ;
68
68
} else {
69
+ // Backwards compat.
69
70
asJS = normalizedModuleName + '.js' ;
70
71
}
71
72
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ suite('Loader.js', function() {
65
65
load . normalizedName = 'abc/def' ;
66
66
assert . equal ( loader . locate ( load ) , 'http://example.org/a/abc/def.js' ) ;
67
67
load . normalizedName = 'abc/def.js' ;
68
- assert . notEqual ( loader . locate ( load ) , 'http://example.org/a/abc/def.js' ) ;
68
+ assert . equal ( loader . locate ( load ) , 'http://example.org/a/abc/def.js' ) ;
69
+ load . normalizedName = './abc/def.js' ;
70
+ assert . equal ( loader . locate ( load ) , 'http://example.org/a/abc/def.js' ) ;
69
71
} ) ;
70
72
71
73
test ( 'traceur@' , function ( ) {
You can’t perform that action at this time.
0 commit comments