From 6a34c7a2e5312ba174a9a9afa3b27cdba89153b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fizer=20Khan=20=28=E0=AE=AA=E0=AF=88=E0=AE=9A=E0=AE=B0?= =?UTF-8?q?=E0=AF=8D=20=E0=AE=95=E0=AE=BE=E0=AE=A9=E0=AF=8D=29?= Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] fix null issue. (#27) --- src/snapshot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snapshot.ts b/src/snapshot.ts index fbffe2db..656de6ea 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -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');