Skip to content

Commit e3c6f06

Browse files
authored
Remove global accesses. See #347 (#354)
1 parent 5ac5ac4 commit e3c6f06

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ exports.constants = {
3838
MAX_STRING_LENGTH: K_STRING_MAX_LENGTH
3939
}
4040

41-
exports.Blob = global.Blob
42-
exports.File = global.File
43-
exports.atob = global.atob
44-
exports.btoa = global.btoa
41+
exports.Blob = typeof Blob !== 'undefined' ? Blob : undefined
42+
exports.File = typeof File !== 'undefined' ? File : undefined
43+
exports.atob = typeof atob !== 'undefined' ? atob : undefined
44+
exports.btoa = typeof btoa !== 'undefined' ? btoa : undefined
4545

4646
/**
4747
* If `Buffer.TYPED_ARRAY_SUPPORT`:

0 commit comments

Comments
 (0)