Validate placeholder type as an object instead of checking if it is a string. This fixes a bug where placeholder is defined as an inline attribute data-placeholder which consists solely of digits. In this case the value type becomes a number which breaks the test typeof placeholder === 'string' and causes the placeholder to get ignored.
This pull request includes a
The following changes were made
Validate placeholder type as an
object
instead of checking if it is astring
. This fixes a bug where placeholder is defined as an inline attributedata-placeholder
which consists solely of digits. In this case the value type becomes anumber
which breaks the testtypeof placeholder === 'string'
and causes the placeholder to get ignored.