Fix that blob urls persist on the shared anchor element and can't be later modified (#1467)

* Fix that blob urls persist on the shared anchor element and can't be later modified

* Create nervous-kiwis-nail.md
This commit is contained in:
Eoghan Murray
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 13333fe19e
commit 8f1a8c962f
2 changed files with 8 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
'rrweb-snapshot': patch
'rrweb': patch
---
Bugfix after #1434 perf improvements: fix that blob urls persist on the shared anchor element and can't be later modified

View File

@@ -218,6 +218,8 @@ function getHref(doc: Document, customHref?: string) {
}
if (!customHref) {
customHref = '';
} else if (customHref.startsWith('blob:') || customHref.startsWith('data:')) {
return customHref;
}
// note: using `new URL` is slower. See #1434 or https://jsbench.me/uqlud17rxo/1
a.setAttribute('href', customHref);