From c50a5e8c6bda2b0916dc07d424c5570f4a61b8f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joona=20Heikkil=C3=A4?= Date: Fri, 2 Jun 2017 10:01:03 +0300 Subject: [PATCH] Print 'no serving' message for empty UniCafe list --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 82da30d..06b1f02 100644 --- a/index.js +++ b/index.js @@ -120,6 +120,11 @@ function newEvents (events) { function todaysFood (id) { this.createFoodList = (str, array, cb) => { + if (array.length === 0) { + cb(str + 'Ei tarjoilua tänään') + return + } + var res = str var edullisesti = '*Edullisesti:* \n' var makeasti = '*Makeasti:*\n'