google / traceur-compiler

Traceur is a JavaScript.next-to-JavaScript-of-today compiler
Apache License 2.0
8.17k stars 580 forks source link

Correct check for undefined variable #2133

Closed mathiasrw closed 8 years ago

mathiasrw commented 8 years ago

The code was comparing the result of typeof with a variable named undefined.

As typeof returns a string it should compare to 'undefined'

arv commented 8 years ago

Thank you.

I'll merge once the tests pass.

arv commented 8 years ago

@mathiasrw Can you also add an entry to AUTHORS?

mathiasrw commented 8 years ago

Sure :)

arv commented 8 years ago

Thanks.

This is consistently failing on node v6.5.0 (npm v3.10.3). Not sure why that is?

mathiasrw commented 8 years ago

Interesting.

I will look into if node 6.5 have any special things regarding typeof

mathiasrw commented 8 years ago

@arv

When testing the master branch - without my changed code - it works on node 6.4 but not on 6.5: https://travis-ci.org/mathiasrw/traceur-compiler/builds/159081592

Node 6.5 was released the 8th of September: https://nodejs.org/en/download/releases/

Last test run was 24th of August: https://travis-ci.org/google/traceur-compiler/builds

So, the test fails because of a new Node release...

I will try to dig a bit down into why and come back with inputs if I find anything...

arv commented 8 years ago

That's unlucky. I'll look too.

arv commented 8 years ago

I fixed the test. Merging.

Thanks again.

mathiasrw commented 8 years ago

Perfect - thanks for quick action :)