fix(editor-media-lib): handle duplicate media folders (#3921)

This commit is contained in:
Erez Rokah 2020-06-18 20:31:46 +03:00 committed by GitHub
parent 9040e7ea1a
commit 822819f42a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
import { List } from 'immutable';
import { List, Set } from 'immutable';
import { get, escapeRegExp } from 'lodash';
import consoleError from '../lib/consoleError';
import { CONFIG_SUCCESS } from '../actions/config';
@ -179,7 +179,7 @@ export const selectMediaFolders = (state: State, collection: Collection, entry:
folders.unshift(selectMediaFolder(state.config, collection, entry, undefined));
}
return folders;
return Set(folders).toArray();
};
export const selectFields = (collection: Collection, slug: string) =>