Skip to content

Commit

Permalink
Fix accidental rewrite of global saveAs function
Browse files Browse the repository at this point in the history
The change is just to put parentheses around the code after `var saveAs = _global.saveAs ||`
and then indent it properly.

closes #498
  • Loading branch information
segovia authored and jimmywarting committed Dec 29, 2018
1 parent be09a02 commit 283f438
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 83 deletions.
4 changes: 2 additions & 2 deletions dist/FileSaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}
}

var saveAs = _global.saveAs || // probably in some web worker
var saveAs = _global.saveAs || ( // probably in some web worker
typeof window !== 'object' || window !== _global ? function saveAs() {}
/* noop */
// Use download attribute first if possible (#193 Lumia mobile)
Expand Down Expand Up @@ -171,7 +171,7 @@
URL.revokeObjectURL(url);
}, 4E4); // 40s
}
};
});
_global.saveAs = saveAs.saveAs = saveAs;

if (typeof module !== 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion dist/FileSaver.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 283f438

Please sign in to comment.