From a566d58f81d8fa7e347921b29073c8174166a6c5 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 5 Feb 2019 21:48:06 +0000 Subject: [PATCH] Fix error on ImproveOSM issues with no comments --- modules/ui/improveOSM_comments.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ui/improveOSM_comments.js b/modules/ui/improveOSM_comments.js index 490d7b5d9..47608e0c5 100644 --- a/modules/ui/improveOSM_comments.js +++ b/modules/ui/improveOSM_comments.js @@ -21,6 +21,8 @@ export function uiImproveOsmComments() { // must retrieve comments from API before they can be displayed services.improveOSM.getComments(_error, function(err, d) { + if (!d.comments) { return; } // nothing to do here + var commentEnter = comments.selectAll('.comment') .data(d.comments) .enter()