Compile the if to JS.