2
0

fix(sheets): 🔒️ Check token id before updating creds

This commit is contained in:
Baptiste Arnaud
2022-07-02 08:28:20 +02:00
parent 994ae61719
commit 9cddc755a3
5 changed files with 35 additions and 15 deletions

View File

@ -259,3 +259,12 @@ export const env = (key = ''): string | undefined => {
? undefined
: (process.env['NEXT_PUBLIC_' + key] as string)
}
export const hasValue = (
value: string | undefined | null
): value is NonNullable<string> =>
value !== undefined &&
value !== null &&
value !== '' &&
value !== 'undefined' &&
value !== 'null'