Fixing broken download link

This commit is contained in:
Jeff Avallone 2014-12-16 23:13:55 -05:00
parent b934423d11
commit c9754de8c4

View File

@ -98,14 +98,12 @@ export default class Regexper {
} }
buildBlobURL(content) { buildBlobURL(content) {
blob = new Blob([content], { type: 'image/svg+xml' }); var blob = new Blob([content], { type: 'image/svg+xml' });
window.blob = blob; // Blob object has to stick around for IE window.blob = blob; // Blob object has to stick around for IE
return URL.createObjectURL(blob); return URL.createObjectURL(blob);
} }
updateLinks() { updateLinks() {
var blob, url;
try { try {
this.download.parentNode.style.display = null; this.download.parentNode.style.display = null;
this.download.href = this.buildBlobURL(this.svg.parentNode.innerHTML); this.download.href = this.buildBlobURL(this.svg.parentNode.innerHTML);