Skip to content

Commit

Permalink
fix: src might be null
Browse files Browse the repository at this point in the history
  • Loading branch information
kptdobe committed Nov 24, 2021
1 parent f1c2e33 commit aa403ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/importer/PageImporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export default abstract class PageImporter implements Importer {
img.setAttribute('src', dataSrc);
}

if (dataSrc && src.indexOf('data:') === 0) {
if (dataSrc && src && src.indexOf('data:') === 0) {
// b64 img, try replace with dataSrc
img.setAttribute('src', dataSrc);
}
Expand Down

0 comments on commit aa403ca

Please sign in to comment.