From 8a0c7a88cdf04a918f75ea92a0ac8909c4f350f5 Mon Sep 17 00:00:00 2001 From: Andrew Mendelsohn Date: Thu, 10 Nov 2022 14:11:55 -0500 Subject: [PATCH] Fix race condition checking stream_mp3 feature flag (#2244) --- packages/web/src/common/store/player/sagas.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/web/src/common/store/player/sagas.ts b/packages/web/src/common/store/player/sagas.ts index f72c483fb9..22a96145c6 100644 --- a/packages/web/src/common/store/player/sagas.ts +++ b/packages/web/src/common/store/player/sagas.ts @@ -27,6 +27,8 @@ import { delay } from 'typed-redux-saga' +import { waitForBackendAndAccount } from 'utils/sagaHelpers' + import errorSagas from './errorSagas' const { getIsReachable } = reachabilitySelectors @@ -59,6 +61,7 @@ const RECORD_LISTEN_INTERVAL = 1000 let FORCE_MP3_STREAM_TRACK_IDS: Set | null = null export function* watchPlay() { + yield* waitForBackendAndAccount() const audiusBackendInstance = yield* getContext('audiusBackendInstance') const apiClient = yield* getContext('apiClient') const remoteConfigInstance = yield* getContext('remoteConfigInstance')