From 85d65f1c563162ff6dee23635cf3ccecd6300314 Mon Sep 17 00:00:00 2001 From: fenwick67 Date: Mon, 1 May 2017 22:34:38 -0500 Subject: [PATCH] fix an edge case where username was "delete" --- lib/convert.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/convert.js b/lib/convert.js index 23cbdc6..295b9d2 100644 --- a/lib/convert.js +++ b/lib/convert.js @@ -83,6 +83,9 @@ function buildUp(jsonObj,opts){ item.stringDate = getTimeDisplay(item.date); item.content = getH(item,'atom:content'); + if (!item.content ){// item was deleted + return false; + } // make anchor tags have the "_top" target item.content = item.content.replace(/\<\s*a\s*/ig,' -1){// item was deleted - return false; - }else{ - return true; - } + return true; });