File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
+ import { isNodeSdk } from '@firebase/util' ;
18
19
import { invalidArgument } from './error' ;
19
20
20
21
export function isJustDef < T > ( p : T | null | undefined ) : p is T | null {
@@ -39,7 +40,9 @@ export function isNativeBlob(p: unknown): p is Blob {
39
40
}
40
41
41
42
export function isNativeBlobDefined ( ) : boolean {
42
- return typeof Blob !== 'undefined' ;
43
+ // Note: The `isNodeSdk()` check can be removed when `ts-node` adds native Blob support
44
+ // PR: https://github.com/node-fetch/node-fetch/pull/1664
45
+ return typeof Blob !== 'undefined' && ! isNodeSdk ( ) ;
43
46
}
44
47
45
48
export function validateNumber (
Original file line number Diff line number Diff line change @@ -505,6 +505,7 @@ describe('Firebase Storage > Upload Task', () => {
505
505
506
506
// Function that notifies when we are in the middle of an exponential backoff
507
507
const readyToCancel = new Promise < null > ( resolve => {
508
+ // @ts -ignore The types for `stub.callsFake` is incompatible with types of `clock.setTimeout`
508
509
stub . callsFake ( ( fn , timeout ) => {
509
510
// @ts -ignore The types for `stub.callsFake` is incompatible with types of `clock.setTimeout`
510
511
const res = fakeSetTimeout ( fn , timeout ) ;
You can’t perform that action at this time.
0 commit comments