From 49167427a0e6516c30c55ea0a695685df40f7b82 Mon Sep 17 00:00:00 2001 From: dominictb Date: Thu, 8 Aug 2024 18:26:44 +0700 Subject: [PATCH] fix: enforce transaction filename to be a string --- src/libs/TransactionUtils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/TransactionUtils/index.ts b/src/libs/TransactionUtils/index.ts index 08cbb31e5a5e..c6d4602594d5 100644 --- a/src/libs/TransactionUtils/index.ts +++ b/src/libs/TransactionUtils/index.ts @@ -163,7 +163,7 @@ function buildOptimisticTransaction( created: created || DateUtils.getDBTime(), pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, receipt: receipt?.source ? {source: receipt.source, state: receipt.state ?? CONST.IOU.RECEIPT_STATE.SCANREADY} : {}, - filename: receipt?.source ?? receipt?.name ?? filename, + filename: (receipt?.source ?? receipt?.name ?? filename).toString(), category, tag, taxCode,