Fix Download button

Huh, I'm not sure why SVGs ever didn't have `crossOrigin: "anonymous"`? The old commit isn't really super helpful for understanding that. Maybe I just didn't notice the problem in that case?

Well, whatever. Let's see if this breaks something else! (I'm also wondering if we should just like, _always_ ask for things with crossOrigin set?)
This commit is contained in:
Emi Matchu 2021-01-08 17:38:27 -08:00
parent 11767828cf
commit 7a5a6b919b

View file

@ -299,7 +299,7 @@ export function FullScreenCenter({ children, ...otherProps }) {
export function getBestImageUrlForLayer(layer) {
if (layer.svgUrl) {
return { src: safeImageUrl(layer.svgUrl) };
return { src: safeImageUrl(layer.svgUrl), crossOrigin: "anonymous" };
} else {
return { src: layer.imageUrl, crossOrigin: "anonymous" };
}