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:
6
.changeset/nervous-kiwis-nail.md
Normal file
6
.changeset/nervous-kiwis-nail.md
Normal 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
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user