From 52595e8a5da15c518393f2b85ce2920f0d69d4d9 Mon Sep 17 00:00:00 2001 From: Loi Phan Date: Wed, 1 Nov 2023 14:55:39 +0700 Subject: [PATCH] Hot fix value in form not show --- hotel-management/src/helpers/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hotel-management/src/helpers/utils.ts b/hotel-management/src/helpers/utils.ts index 1dcbbd7..b774f80 100644 --- a/hotel-management/src/helpers/utils.ts +++ b/hotel-management/src/helpers/utils.ts @@ -87,7 +87,9 @@ const getValueFromObj = (obj: T | null = null): TKeyString => { for (const key of Object.keys(obj)) { const tempValue = obj[key as keyof typeof obj]; const value: string | boolean | number = - typeof tempValue === 'boolean' || typeof tempValue === 'string' + typeof tempValue === 'boolean' || + typeof tempValue === 'string' || + typeof tempValue === 'number' ? tempValue : '';