We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2ee707 commit f80a87bCopy full SHA for f80a87b
src/angular-file-saver.js
@@ -67,18 +67,16 @@ function SaveAs($window) {
67
*/
68
69
download: function(data, filename, options) {
70
- if (!isArray(data) || !isBlobInstance(data)) {
+ options = options || {};
71
+
72
+ if (!isArray(data) && !isBlobInstance(data)) {
73
handleErrors('Data argument should be represented as an array or Blob instance');
74
}
75
76
if (!isString(filename)) {
77
handleErrors('Filename argument should be a string');
78
79
- if (!isObject(options)) {
- handleErrors('Options argument should be an object');
80
- }
81
-
82
if (isBlobInstance(data)) {
83
return save(data, filename);
84
0 commit comments