Skip to content

Commit

Permalink
Merge pull request #253 from contentstack/fix/DX-1371
Browse files Browse the repository at this point in the history
fix: added fix for updateasseturl for handling jrte within blocks
  • Loading branch information
vkalta authored Dec 5, 2024
2 parents e657d79 + a9161ab commit 8b9f81d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/core/contentstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,19 @@ class Contentstack {
}
}
}
x(entry[key].children);
let _entry = {...entry};
const keys = key.split(".");
for (const k of keys) {
if (_entry[k]) _entry = _entry[k];
else if (_entry.length) {
for (const block of _entry) {
if (block[k]) {
_entry = block[k];
}
}
}
}
if (_entry.children) x(_entry.children);
if (correspondingAsset) {
correspondingAsset['href'] = item.url;
}
Expand Down

0 comments on commit 8b9f81d

Please sign in to comment.