chore(img): return targetUrl as given href (#916)

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron Pham 2024-02-23 00:55:35 -05:00 committed by GitHub
parent 96c7076fb5
commit 129e878b29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,10 +61,7 @@ async function mouseEnterHandler(
switch (contentTypeCategory) { switch (contentTypeCategory) {
case "image": case "image":
const img = document.createElement("img") const img = document.createElement("img")
img.src = targetUrl.toString()
response.blob().then((blob) => {
img.src = URL.createObjectURL(blob)
})
img.alt = targetUrl.pathname img.alt = targetUrl.pathname
popoverInner.appendChild(img) popoverInner.appendChild(img)