diff --git a/apps/calendar/settings.js b/apps/calendar/settings.js index 40eca9f68..de731c632 100644 --- a/apps/calendar/settings.js +++ b/apps/calendar/settings.js @@ -1,14 +1,14 @@ (function (back) { var FILE = "calendar.json"; const HOLIDAY_FILE = "calendar.days.json"; - var settings = require('Storage').readJSON(FILE, true) || {}; + var settings = require('Storage').readJSON(FILE, 1) || {}; if (settings.ndColors === undefined) if (process.env.HWVERSION == 2) { settings.ndColors = true; } else { settings.ndColors = false; } - const holidays = require("Storage").readJSON(HOLIDAY_FILE,1).sort((a,b) => new Date(a.date) - new Date(b.date)) || []; + const holidays = (require("Storage").readJSON(HOLIDAY_FILE,1)||[]).sort((a,b) => new Date(a.date) - new Date(b.date)) || []; function writeSettings() { require('Storage').writeJSON(FILE, settings);