check for both null AND undefined in stream writer (#44)

This fixes IDZ support when minime is run using a newer LTS version of
node js.
(Streams use null for the error argument now for write and end
callbacks)
This commit is contained in:
Emi Midnight 2024-03-19 11:59:08 +01:00 committed by GitHub
parent d6d98aa561
commit 87661cf871
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,7 @@ export default function makeWriter(stm: Writable) {
stm.write(buf, error => {
busy = false;
if (error !== undefined) {
if (error !== null && error !== undefined) {
reject(error);
} else {
resolve();