diff -r b833d7c72ea9 -r 5869151a1f2f web/res/js/live-polemic.js --- a/web/res/js/live-polemic.js Wed Dec 11 11:04:27 2019 +0100 +++ b/web/res/js/live-polemic.js Wed Dec 11 14:30:18 2019 +0100 @@ -482,7 +482,7 @@ html += ' style="display: none"'; } html += '>'; - if (tweet.annotations.length) { + if (tweet.annotations && tweet.annotations.length) { html += '
'; for (var i in tweet.annotations) { html += '
'; @@ -507,10 +507,10 @@ txt += highlight( tweet.full_text.substring(lastend) ); html += '

' + a_user + highlight('@' + tweet.user.screen_name) + '' + ( className == 'full' ? ' (' + tweet.user.name + ')
' : ' : ') + txt + '

'; if (className == 'full' && el == 'li') { - html += '
afficher tweet - '; - html += 'répondre · '; - html += 'retweeter · '; - html += 'favori
'; + html += '
afficher tweet - '; + html += 'répondre · '; + html += 'retweeter · '; + html += 'favori
'; } } html += '
'; @@ -550,7 +550,7 @@ var x, y, dt = tweet.date_value, - ann = ( annotation ? annotation : ( tweet.annotations.length ? tweet.annotations[0] : 'default' ) ); + ann = ( annotation ? annotation : ( tweet.annotations && tweet.annotations.length ? tweet.annotations[0] : 'default' ) ); for (var i = 0; i < twCx.tlOnDisplay.length; i++) { if (twCx.tlOnDisplay[i].end > dt) { y = twCx.tlHeight - (i + .5) * twCx.scaleY; @@ -857,7 +857,7 @@ var tweetid = twCx.tlOnDisplay[i].tweets[j], tweet = tweetById(tweetid); if (tweet) { - if (tweet.annotations.length) { + if (tweet.annotations && tweet.annotations.length) { for (var k in tweet.annotations) { displayData[tweet.annotations[k]].push(tweetid); }