fix(cloudinary): allow multiple asset selection per field (#2157)
This commit is contained in:
parent
b42a9c69db
commit
e297075116
@ -60,7 +60,7 @@ async function init({ options = {}, handleInsert } = {}) {
|
||||
|
||||
const insertHandler = data => {
|
||||
const assets = data.assets.map(asset => getAssetUrl(asset, resolvedOptions));
|
||||
handleInsert(cloudinaryConfig.multiple ? assets : assets[0]);
|
||||
handleInsert(assets.length > 1 ? assets : assets[0]);
|
||||
};
|
||||
|
||||
const mediaLibrary = window.cloudinary.createMediaLibrary(cloudinaryConfig, { insertHandler });
|
||||
|
Loading…
x
Reference in New Issue
Block a user