Browse code

Fix delicious widget js error JS error occured when there's no tags on bookmarks Check if it's an empty string before join item[i].t

hSATAC authored on 21/12/2011 at 02:53:32
Showing 1 changed files
... ...
@@ -110,7 +110,7 @@ function wrapFlashVideos() {
110 110
 function renderDeliciousLinks(items) {
111 111
   var output = "<ul>";
112 112
   for (var i=0,l=items.length; i<l; i++) {
113
-    output += '<li><a href="' + items[i].u + '" title="Tags: ' + items[i].t.join(', ') + '">' + items[i].d + '</a></li>';
113
+    output += '<li><a href="' + items[i].u + '" title="Tags: ' + (items[i].t == "" ? "" : items[i].t.join(', ')) + '">' + items[i].d + '</a></li>';
114 114
   }
115 115
   output += "</ul>";
116 116
   $('#delicious').html(output);