removed unnecessary conditions from pluggable_js controller helper