limit maximum of 5 suggestions displayed in any given context

This commit is contained in:
haszari 2019-02-25 16:00:47 +13:00
parent ae3f397855
commit c1a2821410
1 changed files with 5 additions and 0 deletions

View File

@ -259,6 +259,11 @@
// render the promo content
for ( var i in promos ) {
// only show a max of 5 suggestions per container
if ( i >= 5 ) {
break;
}
var linkText = promos[ i ]['link-text'];
var linkoutIsButton = false;
if ( promos[ i ]['button-text'] ) {