Skip to content

Commit

Permalink
fix for old thumbnails when generating pug report
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Barros authored and Sergio Barros committed Aug 25, 2022
1 parent de9b817 commit a9b55e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/assets/report/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ html
screenshots.forEach((screenshot) => {
let img = document.getElementById(`screenshot_${screenshot._id}`);
if (img != undefined) {
img.src = screenshot.thumbnail;
let thumbnail = screenshot.thumbnail;
if (!thumbnail.startsWith('data:image')) {
thumbnail = `data:image/png;base64,${thumbnail}`
}
img.src = thumbnail;
}
});
}
Expand Down

0 comments on commit a9b55e1

Please sign in to comment.