{"ref":"refs/heads/master","push_id":55507045,"commits":[{"sha":"fb1d9223d6781beb9f074703743dca74652cd678","author":{"email":"6dbc639d00ba051a865c4ea925a50e7b375ed74f@amix.dk","name":"amix"},"url":"https://api.github.com/repos/amix/js2coffee/commits/fb1d9223d6781beb9f074703743dca74652cd678","message":"Fixed a problem with if statements (the rewriting is too greedy and it removes too much code)\n\nSample code\n=======\n\n    if(isSafari())\n        ta = TEXTAREA(name_d, d.name_val);\n    else {\n        ta = TEXTAREA(name_d);\n    }\n\n    if(isSafari()) { } else { ta = TEXTAREA(name_d); }\n\n    if(isSafari()) { } else { ta = TEXTAREA(name_d); }\n\nHow the current compiler compiles it (incorrectly for the first rewrite)\n=========\n\n    ta = TEXTAREA(name_d)  unless isSafari()\n    ta = TEXTAREA(name_d)  unless isSafari()\n    ta = TEXTAREA(name_d)  unless isSafari()\n\nHow this fix compiles the above JS code (correctly):\n========\n\n    if isSafari()\n      ta = TEXTAREA(name_d, d.name_val)\n    else\n      ta = TEXTAREA(name_d)\n    ta = TEXTAREA(name_d)  unless isSafari()\n    ta = TEXTAREA(name_d)  unless isSafari()\n\nThis issue has been reported here\nhttps://github.com/rstacruz/js2coffee/issues/108"}],"head":"fb1d9223d6781beb9f074703743dca74652cd678","size":1}