Skip to content

Commit

Permalink
feat(Ldclient lib): Update ldclient lib and use method to wait for cl…
Browse files Browse the repository at this point in the history
…ient initialization
  • Loading branch information
Luiz Guilherme committed Jun 14, 2019
1 parent 3fc3c09 commit a74287d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"semantic-release": "semantic-release --prepare && npm publish && semantic-release post"
},
"dependencies": {
"ldclient-js": "^2.6.0",
"ldclient-js": "^2.7.0",
"uuid": "^3.3.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/FeatureToggleClientService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class FeatureToggleClientService {
const withUserFeaturePromise = new Promise(async (resolve, reject) => {
try {
if (this.userInstance) {
await this.userInstance.waitUntilReady();
await this.userInstance.waitForInitialization();
resolve(this.userInstance.variation(featureKey, defaultValue));
} else {
resolve(undefined);
Expand All @@ -133,7 +133,7 @@ export class FeatureToggleClientService {
async (resolve, reject) => {
try {
if (this.applicationInstance) {
await this.applicationInstance.waitUntilReady();
await this.applicationInstance.waitForInitialization();
resolve(this.applicationInstance.variation(featureKey, defaultValue));
} else {
resolve(undefined);
Expand Down

0 comments on commit a74287d

Please sign in to comment.