mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
fix: handle undefined dateString
This commit is contained in:
1 parent
e2c42a0c7a
commit
415bd9989c
1 file changed
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user