-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read properties of null (reading 'charAt') at m.onBeforeMask #2789
Comments
You shouldn't set values to I usually check the initial value of my components which use Inputmask if it's valid. If it's not valid (empty string, |
I can agree with what @Techn1c4l says, but on the other hand should the mask not fail if some faulty value is passed, but it should just ignore it. |
I don't agree because not good performance on server convert null to empty
string, example more data of key in php array is null, or array more nested
key data is null display to more input, we will format it on server not good
…On Tue, May 14, 2024 at 1:52 PM Robin Herbots ***@***.***> wrote:
@sinhnv1991 <https://github.com/sinhnv1991>, @Techn1c4l
<https://github.com/Techn1c4l> ,
I can agree with what @Techn1c4l <https://github.com/Techn1c4l> says, but
on the other hand should the mask not fail if some faulty value is passed,
but it should just ignore it.
—
Reply to this email directly, view it on GitHub
<#2789 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWDJR3VJWUJKNGIXIILS3TTZCGYB7AVCNFSM6AAAAABHSF3W6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBZGQYTKMRTGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Please add new line e = e === null ? "" : e; on file inputmask.js at function onBeforeMask: function(e, t) {...
line 1812, because if value to input from database is null, null is not string can't reading charAt
onBeforeMask: function(e, t) {
var n = t.radixPoint || ",";
//please add line
e = e === null ? "" : e;//check only null because keep 0 value display to input
}
example mask currency will error
The text was updated successfully, but these errors were encountered: