fix null issue. (#27)
This commit is contained in:
committed by
GitHub
parent
b5e9b40f4d
commit
7da67ec182
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user