From 12fc6d7d9d25cab41bfbdf23aa2e1818421908d8 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 6 May 2024 00:26:23 +0200 Subject: [PATCH] UX: fix #1935 --- src/Models/Denomination.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Models/Denomination.ts b/src/Models/Denomination.ts index f962d7b82..4a7b13c12 100644 --- a/src/Models/Denomination.ts +++ b/src/Models/Denomination.ts @@ -167,7 +167,7 @@ export class Denomination { * Returns null if it doesn't match this unit */ public StrippedValue(value: string, actAsDefault: boolean, inverted: boolean): string { - if (value === undefined) { + if (value === undefined || value === "") { return undefined } @@ -183,10 +183,10 @@ export class Denomination { } function substr(key) { - if (self.prefix) { + if (this.prefix) { return value.substring(key.length).trim() } - let trimmed = value.substring(0, value.length - key.length).trim() + let trimmed = value.substring(0, value.length - key.length).trim() if(!inverted){ return trimmed }