From cf498f230ddbc36df7fe8a8c441d15e7168a09e4 Mon Sep 17 00:00:00 2001 From: satyam-seth Date: Sat, 21 Oct 2023 00:57:15 +0530 Subject: [PATCH] Initialize recentCallOnNumber if inputField.value is not empty --- src/ts/pages/dialpad.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ts/pages/dialpad.ts b/src/ts/pages/dialpad.ts index 704ea37..2e35835 100644 --- a/src/ts/pages/dialpad.ts +++ b/src/ts/pages/dialpad.ts @@ -116,7 +116,9 @@ export default class Dialpad { this.inputField.value = this.recentCallOnNumber; this.inputField.focus(); this.keypad.enableBackspaceButton(); - } else { + } + // if value is not empty (or add check for valid phone number) + else if (this.inputField.value !== '') { // update last call on number this.recentCallOnNumber = this.inputField.value;