File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ export class FunctionsClient {
54
54
try {
55
55
let _headers : Record < string , string > = { }
56
56
let body : any
57
- if ( functionArgs instanceof Blob || functionArgs instanceof ArrayBuffer ) {
57
+ if (
58
+ ( typeof Blob !== 'undefined' && functionArgs instanceof Blob ) ||
59
+ functionArgs instanceof ArrayBuffer
60
+ ) {
58
61
// will work for File as File inherits Blob
59
62
// also works for ArrayBuffer as it is the same underlying structure as a Blob
60
63
_headers [ 'Content-Type' ] = 'application/octet-stream'
@@ -63,7 +66,7 @@ export class FunctionsClient {
63
66
// plain string
64
67
_headers [ 'Content-Type' ] = 'text/plain'
65
68
body = functionArgs
66
- } else if ( functionArgs instanceof FormData ) {
69
+ } else if ( typeof FormData !== 'undefined' && functionArgs instanceof FormData ) {
67
70
// don't set content-type headers
68
71
// Request will automatically add the right boundary value
69
72
body = functionArgs
You can’t perform that action at this time.
0 commit comments