From 63458ddb3a75422c6d17913f5d320684af95faa1 Mon Sep 17 00:00:00 2001 From: Jaafar Sharafeddine Date: Thu, 26 Oct 2023 18:23:10 +0200 Subject: [PATCH] Fixing a bug in merging token id and user info data. 0 is being omitted. --- src/ClaimsService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ClaimsService.ts b/src/ClaimsService.ts index 6437cf33e..66752e65c 100644 --- a/src/ClaimsService.ts +++ b/src/ClaimsService.ts @@ -70,7 +70,7 @@ export class ClaimsService { for (const [claim, values] of Object.entries(claims2)) { for (const value of Array.isArray(values) ? values : [values]) { const previousValue = result[claim]; - if (!previousValue) { + if (previousValue === undefined) { result[claim] = value; } else if (Array.isArray(previousValue)) {