Closed excenter closed 7 years ago
it also happens if run through once.
To clarify, we use Traceur as a gulp task before publishing, and including an entire runtime because traceur has different ideas about typeof comparisons is bananas. Are there options/flags we can use so that it doesn't call for the traceurRuntime?
Thanks @UltCombo
it works in that format, but how does one pass that option to traceur in gulp?
var traceurOptions = {
symbols: false
};
followed by .pipe(traceur(traceurOptions))
still changes if ( typeof id == 'object'){
to if ((typeof id === 'undefined' ? 'undefined' : $traceurRuntime.typeof(id)) == 'object') {
CORRECTION: Thank you that does fix things, it doesn't if you apply the pipe to the second translation and not the first.
I have a simple line of code
} else if ( typeof id == 'object'){
which when run through.pipe(traceur())
twice is mangled into} else if ((typeof id === 'undefined' ? 'undefined' : $traceurRuntime.typeof(id)) == 'object') {
which give me $traceurRuntime is not defined whenever it's run in the browser.