syncCollection before createCollection

This commit is contained in:
Abhinav-grd 2021-07-27 09:59:20 +05:30
parent 06c2a0f832
commit 717b22e9c3

View file

@ -224,7 +224,7 @@ export const createCollection = async (
type: CollectionType, type: CollectionType,
): Promise<Collection> => { ): Promise<Collection> => {
try { try {
const existingCollections = await getLocalCollections(); const existingCollections = await syncCollections();
for (const collection of existingCollections) { for (const collection of existingCollections) {
if (collection.name === collectionName) { if (collection.name === collectionName) {
return collection; return collection;