Avoid pushing untranspiled code in case of an error

Thanks to @sindresorhus for the suggestion.