fix: text editor save to use assets array instead of object

This commit is contained in:
Kristin Aoki
2022-10-25 10:42:26 -04:00
committed by GitHub
parent 8e55081ce1
commit ca5846f1f6

View File

@@ -190,7 +190,8 @@ export const setAssetToStaticUrl = ({ editorValue, assets }) => {
*/
let content = editorValue;
const assetUrls = [];
assets.forEach(asset => {
const assetsList = Object.values(assets);
assetsList.forEach(asset => {
assetUrls.push({ portableUrl: asset.portableUrl, displayName: asset.displayName });
});
const assetSrcs = typeof content === 'string' ? content.split(/(src="|href=")/g) : [];