From 3d9ffe381a92456d94857e15e57e573f1d56d31d Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Mon, 29 Sep 2025 19:02:54 -0400 Subject: [PATCH] fix: angular tests in main Signed-off-by: Todd Baert --- .../angular/projects/angular-sdk/tsconfig.spec.json | 10 ++++++++-- packages/web/src/open-feature.ts | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/angular/projects/angular-sdk/tsconfig.spec.json b/packages/angular/projects/angular-sdk/tsconfig.spec.json index 9c9393283..893eca678 100644 --- a/packages/angular/projects/angular-sdk/tsconfig.spec.json +++ b/packages/angular/projects/angular-sdk/tsconfig.spec.json @@ -6,13 +6,19 @@ "vitest/globals", "node" ], + "baseUrl": "../", "paths": { "angular": [ "./dist/angular" - ] + ], + "@openfeature/core": [ "../../shared/src" ], + "@openfeature/web-sdk": [ "../../web/src" ] }, "esModuleInterop": true, - "emitDecoratorMetadata": true + "emitDecoratorMetadata": true, + "noImplicitOverride": false, + "noPropertyAccessFromIndexSignature": false, + "strict": false }, "include": [ "src/**/*.spec.ts", diff --git a/packages/web/src/open-feature.ts b/packages/web/src/open-feature.ts index 57d714a47..be6c7f845 100644 --- a/packages/web/src/open-feature.ts +++ b/packages/web/src/open-feature.ts @@ -393,7 +393,7 @@ export class OpenFeatureAPI const maybePromise = wrapper.provider.onContextChange(oldContext, newContext); // only reconcile if the onContextChange method returns a promise - if (typeof maybePromise?.then === 'function') { + if (maybePromise && typeof maybePromise?.then === 'function') { wrapper.incrementPendingContextChanges(); wrapper.status = this._statusEnumType.RECONCILING; this.getAssociatedEventEmitters(domain).forEach((emitter) => {