From 2e0b130ac5a4c63c2fa9252ff778f41639c231ce Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 26 May 2018 16:19:24 +0200 Subject: [PATCH] Optimize latest posts page --- assets/js/pages/latestPosts/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/pages/latestPosts/main.js b/assets/js/pages/latestPosts/main.js index c26e439a..e91455e7 100644 --- a/assets/js/pages/latestPosts/main.js +++ b/assets/js/pages/latestPosts/main.js @@ -106,8 +106,9 @@ ComunicWeb.pages.latestPosts.main = { //Display the list of posts ComunicWeb.pages.latestPosts.main._display_list(response, target); - //Unlock posts loading - ComunicWeb.pages.latestPosts.main._load_post_locked = false; + //Unlock posts loading (if required) + if(response.length != 0) + ComunicWeb.pages.latestPosts.main._load_post_locked = false; }); },