fix null issue. (#27)
This commit is contained in:
committed by
GitHub
parent
f29c5abfbc
commit
6a34c7a2e5
@@ -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