mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-01-04 06:34:44 +08:00
fix(jwt-parser): prevent [object Object] value
This commit is contained in:
parent
0ddf18f4b5
commit
a312dedf65
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ function decodeJwt({ jwt }: { jwt: string }) {
|
|||
|
||||
function parseClaims({ claim, value }: { claim: string; value: unknown }) {
|
||||
const claimDescription = CLAIM_DESCRIPTIONS[claim];
|
||||
const formattedValue = _.toString(value);
|
||||
const formattedValue = _.isPlainObject(value) ? JSON.stringify(value, null, 3) : _.toString(value);
|
||||
const friendlyValue = getFriendlyValue({ claim, value });
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue