mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +08:00
Replace vue-svg-loader dependency with simple JS file (fixes a security alert) (#389)
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
export function download(filename: string, fileData: string) {
|
||||
let type = "text/plain;charset=utf-8";
|
||||
if (filename.endsWith(".svg")) {
|
||||
type = "image/svg+xml;charset=utf-8";
|
||||
}
|
||||
const type = filename.endsWith(".svg") ? "image/svg+xml;charset=utf-8" : "text/plain;charset=utf-8";
|
||||
const blob = new Blob([fileData], { type });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const element = document.createElement("a");
|
||||
|
||||
Reference in New Issue
Block a user