From db70e042ca9187a51109b06fcc3d7697add0b6c0 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Thu, 23 Mar 2023 00:39:48 -0700 Subject: [PATCH] Fix NPE for macOS unix sockets --- io/js/src/main/scala/fs2/io/ioplatform.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/js/src/main/scala/fs2/io/ioplatform.scala b/io/js/src/main/scala/fs2/io/ioplatform.scala index 85f2b0fac2..f9d1805d4f 100644 --- a/io/js/src/main/scala/fs2/io/ioplatform.scala +++ b/io/js/src/main/scala/fs2/io/ioplatform.scala @@ -151,7 +151,7 @@ private[fs2] trait ioplatform { F.delay { writable.write( head.toUint8Array, - e => cb(e.toLeft(()).leftMap(js.JavaScriptException)) + e => cb(e.filterNot(_ == null).toLeft(()).leftMap(js.JavaScriptException)) ) Some(F.delay(writable.destroy())) }