This repository was archived by the owner on Jul 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- require ( 'traceur' ) ;
1+ if ( ! global . traceur )
2+ require ( 'traceur' ) ;
23module . exports = {
34 Loader : require ( './loader' ) ,
45 Module : Module ,
Original file line number Diff line number Diff line change @@ -225,6 +225,9 @@ function logloads(loads) {
225225 load . kind = 'declarative' ;
226226 depsList = getImports ( body ) ;
227227
228+ var oldSourceMaps = traceur . options . sourceMaps ;
229+ var oldModules = traceur . options . modules ;
230+
228231 traceur . options . sourceMaps = true ;
229232 traceur . options . modules = 'instantiate' ;
230233
@@ -266,10 +269,16 @@ function logloads(loads) {
266269 System . register = curRegister ;
267270 if ( curSystem )
268271 __global . System = curSystem ;
272+ if ( oldSourceMaps )
273+ traceur . options . sourceMaps = oldSourceMaps ;
274+ if ( oldModules )
275+ traceur . options . modules = oldModules ;
269276 throw e ;
270277 }
271278 System . register = curRegister ;
272279 __global . System = curSystem ;
280+ traceur . options . sourceMaps = oldSourceMaps ;
281+ traceur . options . modules = oldModules ;
273282 }
274283 else if ( typeof instantiateResult == 'object' ) {
275284 depsList = instantiateResult . deps || [ ] ;
Original file line number Diff line number Diff line change 219219 if ( global . System && global . traceur )
220220 global . traceurSystem = global . System ;
221221
222- global . System = System ;
222+ if ( isBrowser )
223+ global . System = System ;
223224
224225 // <script type="module"> support
225226 // allow a data-init function callback once loaded
You can’t perform that action at this time.
0 commit comments