From 7145a0b1cde2629864cb329e5a12c68e33dfeb6a Mon Sep 17 00:00:00 2001 From: Artem Anufrij Date: Fri, 22 Sep 2023 14:22:55 +0200 Subject: [PATCH] set empty covers for radios in the db funktion --- services/database/radios.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/database/radios.js b/services/database/radios.js index 838b1e2..d9ba08d 100644 --- a/services/database/radios.js +++ b/services/database/radios.js @@ -13,6 +13,9 @@ exports.collection = function (callback) { .toArray((err, result) => { result.forEach(item => { item.type = "radio"; + if (!item.covers) { + item.covers = {}; + } }); callback(result); });