Skip to content

Commit

Permalink
only update values if trackModified is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
korsvanloon committed Feb 20, 2024
1 parent 7b9c97d commit f21b508
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ export class FederatedToken {
Buffer.from(at, "base64").toString("ascii")
);

this._valueModified = trackModified && !isEqual(this.values, token.values);
if (trackModified) {
this._valueModified = !isEqual(this.values, token.values);

this._accessTokenModified =
trackModified &&
Object.keys(token.tokens).some(
this._accessTokenModified = Object.keys(token.tokens).some(
(key) => !isEqual(this.tokens[key], token.tokens[key])
);
}

// Merge tokens and values into "this" object.
this.tokens = {
Expand Down

0 comments on commit f21b508

Please sign in to comment.