Update composer.js

Wrong compare to "undefined" and name.length of undefined.
Not really, because  I have input that don't have name attribute.