From aa24c7c3630fd5ed611aa12d5da7d072077325e1 Mon Sep 17 00:00:00 2001 From: Ashton Huxtable <78318468+ashton-huxtable@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:57:04 -0600 Subject: [PATCH] fix: update logic for conditional Co-authored-by: Oscar Bazaldua <511911+oscb@users.noreply.github.com> --- packages/core/src/flushPolicies/background-flush-policy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/flushPolicies/background-flush-policy.ts b/packages/core/src/flushPolicies/background-flush-policy.ts index 0fdeda93..85cb22bd 100644 --- a/packages/core/src/flushPolicies/background-flush-policy.ts +++ b/packages/core/src/flushPolicies/background-flush-policy.ts @@ -18,7 +18,7 @@ export class BackgroundFlushPolicy extends FlushPolicyBase { 'change', (nextAppState) => { if ( - (this.appState === 'active' || 'unknown') && + (this.appState === 'active' || this.appState === 'unknown') && ['inactive', 'background'].includes(nextAppState) ) { // When the app goes into the background we will trigger a flush