From 3ea5e5fae693b65184f3d93d8becb9d5089a3f5b Mon Sep 17 00:00:00 2001 From: Raghav Jit <98019979+RaghavJit@users.noreply.github.com> Date: Sun, 9 Apr 2023 11:28:04 +0530 Subject: [PATCH] Wallpaper can be set for less then 5 tasks --- code/brain/testing.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/code/brain/testing.js b/code/brain/testing.js index a049b3c1..74df3739 100644 --- a/code/brain/testing.js +++ b/code/brain/testing.js @@ -195,11 +195,22 @@ exports.WallpaperTaskList = () => { // Use the JSON data as needed let TaskString = '' - for(let i=0; i<5; i++){ + let limit = 5 + if(jsonData.Task_List.length <= 5){ + limit = jsonData.Task_List.length + } + + for(let i=1; i { console.error(error);