Skip to content

Commit

Permalink
changed utility helper
Browse files Browse the repository at this point in the history
  • Loading branch information
pouchcms committed Feb 29, 2024
1 parent 9f00173 commit 0fe4a51
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ blocks.forEach((el,i)=>{
}
break;
case "image":
console.log(el)
if(el.data.file.url.length > 0){
let img = document.createElement("img");
img.setAttribute("id",`${el.id}`);
img.setAttribute("src",`${el.data.file.url}`);
img.setAttribute("alt",`${el.data.caption}`);
article.append(img)
}
break;
case "table":
if(el.data){
Expand Down

0 comments on commit 0fe4a51

Please sign in to comment.