Update composer.js

Wrong compare to "undefined" and name.length of undefined.