fix null issue. (#27)

This commit is contained in:
Fizer Khan (பைசர் கான்)
2026-04-01 12:00:00 +08:00
committed by GitHub
parent f29c5abfbc
commit 6a34c7a2e5

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');