From 20cee7f3d621191587ec56fe9c6c3eba204fa987 Mon Sep 17 00:00:00 2001 From: navedqb <109583873+navedqb@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:24:53 +0530 Subject: [PATCH] fix null issue on input blur --- src/app/components/inputnumber/inputnumber.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/inputnumber/inputnumber.ts b/src/app/components/inputnumber/inputnumber.ts index 4b1ccb338d9..a60e0cfb2ee 100644 --- a/src/app/components/inputnumber/inputnumber.ts +++ b/src/app/components/inputnumber/inputnumber.ts @@ -1379,9 +1379,9 @@ export class InputNumber implements OnInit, AfterContentInit, OnChanges, Control onInputBlur(event: Event) { this.focused = false; - let newValue = this.validateValue(this.parseValue(this.input.nativeElement.value)).toString(); + let newValue = this.validateValue(this.parseValue(this.input.nativeElement.value)); this.input.nativeElement.value = this.formatValue(newValue); - this.input.nativeElement.setAttribute('aria-valuenow', newValue); + newValue && this.input.nativeElement.setAttribute('aria-valuenow', newValue.toString()); this.updateModel(event, newValue); this.onBlur.emit(event); }