From 467bb63c8c933ec03e8a008cba80591ebd5ad31a Mon Sep 17 00:00:00 2001 From: ranfeng Date: Wed, 20 Dec 2023 17:55:29 +0800 Subject: [PATCH] parse empty line break --- src/parse.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse.ts b/src/parse.ts index c13e3c4..ce59b14 100644 --- a/src/parse.ts +++ b/src/parse.ts @@ -142,8 +142,8 @@ export function getMessages( // if this message already has data, append the new value to the old. // otherwise, just set to the new value: message.data = message.data - ? message.data + '\n' + value - : value; // otherwise, + ? message.data + (value || '\n') + : value || '\n'; // otherwise, break; case 'event': message.event = value;