From 415bd9989ce9fdcaea98ef16112da8844af19d48 Mon Sep 17 00:00:00 2001 From: phamhieu Date: Wed, 18 May 2022 10:53:16 +0700 Subject: [PATCH] fix: handle undefined dateString --- .../components/interfaces/Authentication/Users/Users.utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/studio/components/interfaces/Authentication/Users/Users.utils.ts b/studio/components/interfaces/Authentication/Users/Users.utils.ts index 97169ba4f03..2a0684e62d3 100644 --- a/studio/components/interfaces/Authentication/Users/Users.utils.ts +++ b/studio/components/interfaces/Authentication/Users/Users.utils.ts @@ -14,10 +14,10 @@ import { detectBrowser } from 'lib/helpers' * this util here for now. But if it does happen elsewhere i'll bring it * to lib/helpers */ -export const formatUserDateString = (dateString: string) => { +export const formatUserDateString = (dateString?: string) => { const browser = detectBrowser() if (browser === 'Safari') { - return dateString.replace(' ', 'T') + return dateString?.replace(' ', 'T') } else { return dateString }