Skip to content

Commit

Permalink
fix: deflate must clean up dangling resources (#1864)
Browse files Browse the repository at this point in the history
  • Loading branch information
inverted-capital committed Feb 15, 2024
1 parent 99895c7 commit 45bc531
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/deflate.js
Expand Up @@ -23,8 +23,9 @@ function testCompressionStream() {
try {
const cs = new CompressionStream('deflate')
// Test if `Blob.stream` is present. React Native does not have the `stream` method
new Blob([]).stream()
if (cs) return true
const stream = new Blob([]).stream()
stream.cancel()
return !!cs
} catch (_) {
// no bother
}
Expand Down

0 comments on commit 45bc531

Please sign in to comment.