From b25ce88232292b08b4203c28fbc1ca0c22adb549 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Thu, 2 Nov 2017 08:45:17 -0400 Subject: [PATCH] more --- contrib/static/feed.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/contrib/static/feed.js b/contrib/static/feed.js index 4af8497..ad6c948 100644 --- a/contrib/static/feed.js +++ b/contrib/static/feed.js @@ -69,11 +69,13 @@ function update_nntpchan_feed_ticker(elem, result_elem) { } var result = j.result; result.sort(function(a, b) { - var aname = a.State.Config.Name; - var bname = a.state.Config.Name; - if(aname > bname) return 1; - else if (aname < bname) return -1; - else return 0; + if(a && b) { + var aname = a.State.Config.Name; + var bname = b.state.Config.Name; + if(aname > bname) return 1; + else if (aname < bname) return -1; + else return 0; + } else return -1; }); for (var idx = 0; idx < result.length; idx++) { var item = result[idx];