Skip to content

Commit f42011d

Browse files
authored
fix: angular tests in main (#1251)
1 parent ed16cc5 commit f42011d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/angular/projects/angular-sdk/tsconfig.spec.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
66
"vitest/globals",
77
"node"
88
],
9+
"baseUrl": "../",
910
"paths": {
1011
"angular": [
1112
"./dist/angular"
12-
]
13+
],
14+
"@openfeature/core": [ "../../shared/src" ],
15+
"@openfeature/web-sdk": [ "../../web/src" ]
1316
},
1417
"esModuleInterop": true,
15-
"emitDecoratorMetadata": true
18+
"emitDecoratorMetadata": true,
19+
"noImplicitOverride": false,
20+
"noPropertyAccessFromIndexSignature": false,
21+
"strict": false
1622
},
1723
"include": [
1824
"src/**/*.spec.ts",

packages/web/src/open-feature.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ export class OpenFeatureAPI
393393
const maybePromise = wrapper.provider.onContextChange(oldContext, newContext);
394394

395395
// only reconcile if the onContextChange method returns a promise
396-
if (typeof maybePromise?.then === 'function') {
396+
if (maybePromise && typeof maybePromise?.then === 'function') {
397397
wrapper.incrementPendingContextChanges();
398398
wrapper.status = this._statusEnumType.RECONCILING;
399399
this.getAssociatedEventEmitters(domain).forEach((emitter) => {

0 commit comments

Comments
 (0)