Skip to content

Commit

Permalink
feat: dependencies spec update (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Oct 27, 2023
1 parent b3ee9bb commit 69516d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@types/sinon": "^10.0.15",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@unleash/client-specification": "^4.5.0",
"@unleash/client-specification": "^4.5.2",
"ava": "^5.3.0",
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
Expand Down
3 changes: 2 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ export default class UnleashClient extends EventEmitter {

if (parent.enabled !== false) {
if (parent.variants?.length) {
return parent.variants.includes(this.getVariant(parent.feature, context).name);
const {name, featureEnabled} = this.getVariant(parent.feature, context);
return featureEnabled && parent.variants.includes(name);
}
return this.isEnabled(parent.feature, context, () => false);
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -785,10 +785,10 @@
"@typescript-eslint/types" "6.4.1"
eslint-visitor-keys "^3.4.1"

"@unleash/client-specification@^4.5.0":
version "4.5.0"
resolved "https://registry.yarnpkg.com/@unleash/client-specification/-/client-specification-4.5.0.tgz#fe5fd5e4543d48ccb9ae3cbf0670586029f4db6a"
integrity sha512-jj50BNlh56Hz1cgn2bvlA3FeNdadWV2S1TU46cn+ko+hC6a5gOnHSwF6QV80RZq7vwes64EbpJSkYJUat+TuMA==
"@unleash/client-specification@^4.5.2":
version "4.5.2"
resolved "https://registry.yarnpkg.com/@unleash/client-specification/-/client-specification-4.5.2.tgz#50162e9c92da859a8620ce158354df4eb5e78222"
integrity sha512-cNdfUEkAEK0BAktFKoKnZCaUqdFQ2mW4oxduy6CN9ctsQDyGAdGjXESa56yi8DXbdTlRhNrVQxAHVQJd3Swf8Q==

acorn-jsx@^5.3.2:
version "5.3.2"
Expand Down

0 comments on commit 69516d9

Please sign in to comment.