imaskjs
imaskjs copied to clipboard
Array Mask breaks on Angular
Describe the bug If the mask consists of an array, it generates errors such as below when anything is entered at zero index:
Error: Cannot read properties of undefined (reading '1')
To Reproduce https://stackblitz.com/edit/angular-13-template-6ddhgj?file=src/app/app.component.ts
Expected behavior The mask should not break (meaning it should not allow multiple negative signs) nor should it throw errors in console
Environment:
- All OS
- All Browser
- IMask (Angular) version 6.4.2
- Angular 13.2
Additional context Please review the video for better understanding
https://user-images.githubusercontent.com/7580112/156524772-b05eebbf-b3a5-4985-9531-8f13b9d1bda2.mov
@uNmAnNeR Please can you check this issue :)
This bug occur on react as well.
fixed in https://github.com/uNmAnNeR/imaskjs/issues/701