mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Remove some unused variables (#3301)
I have noticed unused variables that seem superfluous.
This commit is contained in:
committed by
GitHub
parent
786ea86e0e
commit
4e7b68a69d
@@ -21,6 +21,7 @@ _This release is scheduled to be released on 2024-01-01._
|
|||||||
- Removed Codecov workflow (not working anymore, other workflow required) (#3107)
|
- Removed Codecov workflow (not working anymore, other workflow required) (#3107)
|
||||||
- Removed titleReplace from calendar, replaced + extended by customEvents (backward compatibility included) (#3249)
|
- Removed titleReplace from calendar, replaced + extended by customEvents (backward compatibility included) (#3249)
|
||||||
- Removed failing unit test (#3254)
|
- Removed failing unit test (#3254)
|
||||||
|
- Removed some unused variables
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
logLevel.setLogLevel = function (newLevel) {
|
logLevel.setLogLevel = function (newLevel) {
|
||||||
if (newLevel) {
|
if (newLevel) {
|
||||||
Object.keys(logLevel).forEach(function (key, index) {
|
Object.keys(logLevel).forEach(function (key) {
|
||||||
if (!newLevel.includes(key.toLocaleUpperCase())) {
|
if (!newLevel.includes(key.toLocaleUpperCase())) {
|
||||||
logLevel[key] = function () {};
|
logLevel[key] = function () {};
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* global CalendarUtils, cloneObject */
|
/* global CalendarUtils */
|
||||||
|
|
||||||
/* MagicMirror²
|
/* MagicMirror²
|
||||||
* Module: Calendar
|
* Module: Calendar
|
||||||
|
@@ -248,7 +248,6 @@ const CalendarFetcherUtils = {
|
|||||||
|
|
||||||
if (typeof event.rrule !== "undefined" && event.rrule !== null && !isFacebookBirthday) {
|
if (typeof event.rrule !== "undefined" && event.rrule !== null && !isFacebookBirthday) {
|
||||||
const rule = event.rrule;
|
const rule = event.rrule;
|
||||||
let addedEvents = 0;
|
|
||||||
|
|
||||||
const pastMoment = moment(past);
|
const pastMoment = moment(past);
|
||||||
const futureMoment = moment(future);
|
const futureMoment = moment(future);
|
||||||
@@ -442,7 +441,6 @@ const CalendarFetcherUtils = {
|
|||||||
|
|
||||||
if (showRecurrence === true) {
|
if (showRecurrence === true) {
|
||||||
Log.debug(`saving event: ${description}`);
|
Log.debug(`saving event: ${description}`);
|
||||||
addedEvents++;
|
|
||||||
newEvents.push({
|
newEvents.push({
|
||||||
title: recurrenceTitle,
|
title: recurrenceTitle,
|
||||||
startDate: (adjustDays ? (adjustDays > 0 ? startDate.add(adjustDays, "hours") : startDate.subtract(Math.abs(adjustDays), "hours")) : startDate).format("x"),
|
startDate: (adjustDays ? (adjustDays > 0 ? startDate.add(adjustDays, "hours") : startDate.subtract(Math.abs(adjustDays), "hours")) : startDate).format("x"),
|
||||||
|
@@ -397,7 +397,7 @@ WeatherProvider.register("openmeteo", {
|
|||||||
generateWeatherObjectsFromForecast(weathers) {
|
generateWeatherObjectsFromForecast(weathers) {
|
||||||
const days = [];
|
const days = [];
|
||||||
|
|
||||||
weathers.daily.forEach((weather, i) => {
|
weathers.daily.forEach((weather) => {
|
||||||
const currentWeather = new WeatherObject();
|
const currentWeather = new WeatherObject();
|
||||||
|
|
||||||
currentWeather.date = weather.time;
|
currentWeather.date = weather.time;
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
const helpers = require("./helpers/global-setup");
|
|
||||||
|
|
||||||
const delay = (time) => {
|
const delay = (time) => {
|
||||||
return new Promise((resolve) => setTimeout(resolve, time));
|
return new Promise((resolve) => setTimeout(resolve, time));
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user