From 44553e7598cfea314f95d3380ea47dd4c688ba90 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Sun, 9 Sep 2018 17:21:56 -0400 Subject: Handle converting empty bytestring to Text. --- Presence/Util.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Presence/Util.hs') diff --git a/Presence/Util.hs b/Presence/Util.hs index a934cad7..a6e5b35f 100644 --- a/Presence/Util.hs +++ b/Presence/Util.hs @@ -44,7 +44,7 @@ textToLazyByteString :: Text -> L.ByteString textToLazyByteString s = L.fromChunks [Text.encodeUtf8 s] lazyByteStringToText :: L.ByteString -> Text -lazyByteStringToText = (foldr1 (<>) . map Text.decodeUtf8 . L.toChunks) +lazyByteStringToText = (foldr (<>) mempty . map Text.decodeUtf8 . L.toChunks) -- | for example: 2001-db8-85a3-8d3-1319-8a2e-370-7348.ipv6-literal.net ip6literal :: Text -> Text -- cgit v1.2.3