You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
core.umd.js? [sm]:6469 ERROR TypeError: Cannot read property 'length' of undefined
at MaskDirective._validateTime (ngx-mask.umd.js:1625)
at MaskDirective.validate (ngx-mask.umd.js:1328)
at eval (forms.umd.js:1067)
at eval (forms.umd.js:1050)
at Array.map ()
at executeValidators (forms.umd.js:1050)
at eval (forms.umd.js:1003)
at eval (forms.umd.js:1050)
at Array.map ()
at executeValidators (forms.umd.js:1050)
🌍 Your Environment
Angular Version:
From the stackblitz package.json:
Looking at the GitHub code, it seems the issue is located here
Where the value is checked to avoid null access, but not undefined.
The issue happened for me when trying to use Formly (a dynamic forms library) and resetting the form via their API. I do not know why they reset to undefined and not null, but they do.
Thanks!
The text was updated successfully, but these errors were encountered:
🐞 bug report
Is this a regression?
I believe it is not a regression.
Description
When masking an input, that is using a formControl, and the value of the formControl is set to
undefined
An exception is thrown from _validateTime.
🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-ivy-1cnarw67657?devtoolsheight=33&file=src/app/app.component.ts
🔥 Exception or Error
🌍 Your Environment
Angular Version:
From the stackblitz package.json:
Anything else relevant?
Looking at the GitHub code, it seems the issue is located here
Where the value is checked to avoid null access, but not undefined.
The issue happened for me when trying to use Formly (a dynamic forms library) and resetting the form via their API. I do not know why they reset to undefined and not null, but they do.
Thanks!
The text was updated successfully, but these errors were encountered: