fix null issue. (#27)

This commit is contained in:
Fizer Khan (பைசர் கான்)
2020-02-25 13:22:38 +05:30
committed by GitHub
parent b5e9b40f4d
commit 7da67ec182

View File

@@ -134,7 +134,7 @@ function getAbsoluteSrcsetString(doc: Document, attributeValue: string) {
}
export function absoluteToDoc(doc: Document, attributeValue: string): string {
if (attributeValue.trim() === '') {
if (!attributeValue || attributeValue.trim() === '') {
return attributeValue;
}
const a: HTMLAnchorElement = doc.createElement('a');