From 64e8c1f4b27b3a6bcd9e79932fdf60d00a67e026 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 18 Feb 2017 12:18:25 +0100 Subject: [PATCH] render empty item --- static/js/homeDialog.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/static/js/homeDialog.js b/static/js/homeDialog.js index 14472c34..18ed1d3a 100644 --- a/static/js/homeDialog.js +++ b/static/js/homeDialog.js @@ -307,14 +307,13 @@ pandora.ui.homeDialog = function() { } function renderItem(data) { - $item.empty().append( - pandora.renderHomeItem({ - data: data, - editItem: editItem - }).css({ - margin: '16px' - }) - ); + $item.empty(); + data && pandora.renderHomeItem({ + data: data, + editItem: editItem + }).css({ + margin: '16px' + }).appendTo($item); } function renderList(items, selected) {