imaskjs icon indicating copy to clipboard operation
imaskjs copied to clipboard

Array Mask breaks on Angular

Open hassanasad opened this issue 2 years ago • 2 comments

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

hassanasad avatar Mar 03 '22 08:03 hassanasad

@uNmAnNeR Please can you check this issue :)

hassanasad avatar Mar 19 '22 17:03 hassanasad

This bug occur on react as well.

btmluiz avatar Jul 08 '22 06:07 btmluiz

fixed in https://github.com/uNmAnNeR/imaskjs/issues/701

uNmAnNeR avatar Sep 02 '22 08:09 uNmAnNeR