From 79a38e017653a4dfe3b93e390bf3ffa73db42e82 Mon Sep 17 00:00:00 2001 From: inverted-capital <69952973+inverted-capital@users.noreply.github.com> Date: Mon, 19 Feb 2024 09:43:37 +1300 Subject: [PATCH] fix: close the test compression stream (#1865) --- src/utils/deflate.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/deflate.js b/src/utils/deflate.js index 1915684b7..5e2c38d7a 100644 --- a/src/utils/deflate.js +++ b/src/utils/deflate.js @@ -22,12 +22,12 @@ async function browserDeflate(buffer) { function testCompressionStream() { try { const cs = new CompressionStream('deflate') + cs.writable.close() // Test if `Blob.stream` is present. React Native does not have the `stream` method const stream = new Blob([]).stream() stream.cancel() - return !!cs + return true } catch (_) { - // no bother + return false } - return false }