ngx-mask
ngx-mask copied to clipboard
inputvalue is null error when calling formControl.reset on hiddenInput mask
Using ngx-mask 12.0.0
Steps to reproduce:
- Create a form control (text input) with hiddenInput set to true using Reactive Forms
- Enter a value into the control/field
- Call control.reset() on the control, or set the control value to null
I receive this error:

inputValue is null when the following code is executed, causing an exception:
inputValue !== '' && actualResult.length
? typeof this.selStart === 'number' && typeof this.selEnd === 'number'
? inputValue.length > actualResult.length
? actualResult.splice(this.selStart, 0, getSymbol)
: inputValue.length