jquery.placeholder: Fixup for 7ec7d879ee
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 27 Jul 2013 05:59:48 +0000 (07:59 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 27 Jul 2013 05:59:48 +0000 (07:59 +0200)
commit4f2e5fe2a096c64cbaa23b0bed3d9c9655bf2dd4
tree6647657d6a2375a6103b0a1bede0016ea895aad0
parent1afc53f3782882faa79fd2b819bc4002a950b1df
jquery.placeholder: Fixup for 7ec7d879ee

Check for 'arguments.length' was done in the wrong scope.
It checked for arguments to .each() which is always 2 (i, el).

This caused a regression where any call to .placeholder() without
arguments resulted in the string 'undefined' to be displayed as
placeholder (since it was doing setAttribute and passing it `text`
which is undefined, and then further using that undefined variable).

Until 7ec7d879ee / a8145d6fa2 this was the only way .placeholder
could be called, so this is a major regression affecting all use
of it.

Change-Id: I862b0f72548ec2122dad9c5d013149ac57688dab
resources/jquery/jquery.placeholder.js