This commit is contained in:
Pieter Vander Vennet 2024-05-06 00:26:23 +02:00
parent d488f8c9b2
commit 12fc6d7d9d

View file

@ -167,7 +167,7 @@ export class Denomination {
* Returns null if it doesn't match this unit * Returns null if it doesn't match this unit
*/ */
public StrippedValue(value: string, actAsDefault: boolean, inverted: boolean): string { public StrippedValue(value: string, actAsDefault: boolean, inverted: boolean): string {
if (value === undefined) { if (value === undefined || value === "") {
return undefined return undefined
} }
@ -183,10 +183,10 @@ export class Denomination {
} }
function substr(key) { function substr(key) {
if (self.prefix) { if (this.prefix) {
return value.substring(key.length).trim() 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){ if(!inverted){
return trimmed return trimmed
} }