fix: don't wait for external media library to load (#3050)

This commit is contained in:
Erez Rokah 2020-01-08 17:21:14 +02:00 committed by GitHub
parent 62e1b823fc
commit 5bd724026c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -464,7 +464,7 @@ export async function waitForMediaLibraryToLoad(
dispatch: ThunkDispatch<State, {}, AnyAction>,
state: State,
) {
if (state.mediaLibrary.get('isLoading') !== false) {
if (state.mediaLibrary.get('isLoading') !== false && !state.mediaLibrary.get('externalLibrary')) {
await waitUntilWithTimeout(dispatch, resolve => ({
predicate: ({ type }) => type === MEDIA_LOAD_SUCCESS || type === MEDIA_LOAD_FAILURE,
run: () => resolve(),