From 492ee0dc613253ea920cfbcd38bf402b15608b89 Mon Sep 17 00:00:00 2001 From: Jorys_Paulin Date: Tue, 1 May 2018 09:50:51 +0200 Subject: [PATCH] Added message when gamelist empty --- static/js/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/index.js b/static/js/index.js index 338bcc8..258389d 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -493,6 +493,11 @@ function showApps(host) { $('#naclSpinner').css('display', 'inline-block'); host.getAppList().then(function(appList) { + if(appList.length == 0) { // TODO: Add placeholder graphic + console.error('%c[index.js, showApps]', 'User\'s applist is empty') + snackbarLog('Your game list is empty') + return; // We stop the function right here + } // if game grid is populated, empty it $("div.game-container").remove();