Skip to content

Commit

Permalink
Fix delicious widget js error
Browse files Browse the repository at this point in the history
JS error occured when there's no tags on bookmarks
Check if it's an empty string before join item[i].t
  • Loading branch information
hSATAC committed Dec 21, 2011
1 parent ce0d251 commit a5a16b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .themes/classic/source/javascripts/octopress.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function wrapFlashVideos() {
function renderDeliciousLinks(items) {
var output = "<ul>";
for (var i=0,l=items.length; i<l; i++) {
output += '<li><a href="' + items[i].u + '" title="Tags: ' + items[i].t.join(', ') + '">' + items[i].d + '</a></li>';
output += '<li><a href="' + items[i].u + '" title="Tags: ' + (items[i].t == "" ? "" : items[i].t.join(', ')) + '">' + items[i].d + '</a></li>';
}
output += "</ul>";
$('#delicious').html(output);
Expand Down

0 comments on commit a5a16b4

Please sign in to comment.