Skip to content

Commit

Permalink
Fixing a bug in merging token id and user info data. 0 is being omitted.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaafar Sharafeddine committed Oct 26, 2023
1 parent 5f6925f commit 63458dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ClaimsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 63458dd

Please sign in to comment.