Open mgol opened 8 years ago
See: https://codepen.io/mgol/pen/GjKqka
The main cause of the bug is the line at https://github.com/angular-ui/ui-mask/blob/1.8.7/src/mask.js#L341:
if (angular.isDefined(placeholder) && placeholder[i]) {
angular.isDefined(null) is true and Angular Material makes placeholder be null here so errors appear as you can see in the codepen.
angular.isDefined(null)
placeholder
null
Changing angular.isDefined(null) to angular.isString(placeholder) should help.
angular.isString(placeholder)
See: https://codepen.io/mgol/pen/GjKqka
The main cause of the bug is the line at https://github.com/angular-ui/ui-mask/blob/1.8.7/src/mask.js#L341:
angular.isDefined(null)
is true and Angular Material makesplaceholder
benull
here so errors appear as you can see in the codepen.Changing
angular.isDefined(null)
toangular.isString(placeholder)
should help.