Skip to content

Commit

Permalink
remove check for blockUserAttributes and change var to const
Browse files Browse the repository at this point in the history
  • Loading branch information
mmustafa-tse committed Dec 3, 2024
1 parent 137bc09 commit 1e5077a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kitBlocking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,15 +460,15 @@ export default class KitBlocker {
if (!this.blockUserAttributes) {
return false
}
var matchedAttributes = this.dataPlanMatchLookups['user_attributes'];
const matchedAttributes = this.dataPlanMatchLookups['user_attributes'];

// When additionalProperties is set to true, matchedAttributes
// will be a boolean, otherwise it will return an object
if (typeof matchedAttributes === 'boolean' && matchedAttributes) {
return false
}

if (this.blockUserAttributes && typeof matchedAttributes === "object") {
if (typeof matchedAttributes === "object") {
if (matchedAttributes[key] === true) {
return false;
} else {
Expand Down

0 comments on commit 1e5077a

Please sign in to comment.