From 6dd50238b0c2ebf2c1c2ae6275bcd316d9c53d92 Mon Sep 17 00:00:00 2001 From: Onokaev Date: Tue, 19 Oct 2021 11:47:38 +0300 Subject: [PATCH] check if emailAddress is available before split --- src/app/views/sidebar/sample-queries/tokens.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/views/sidebar/sample-queries/tokens.ts b/src/app/views/sidebar/sample-queries/tokens.ts index 0af391eae..e419ffbd9 100644 --- a/src/app/views/sidebar/sample-queries/tokens.ts +++ b/src/app/views/sidebar/sample-queries/tokens.ts @@ -153,7 +153,10 @@ export function getTokens(user?: any) { return 'contoso.com'; }, authenticatedUserValueFn: () => { - return emailAddress.split('@')[1]; + if (emailAddress) { + return emailAddress.split('@')[1]; + } + return ''; } }, {