Fix missing typeof in calendar module (#3286)

I think comparing here with "undefined" (as a string) makes only sense
with typeof.
This commit is contained in:
Kristjan ESPERANTO 2023-12-07 08:11:56 +01:00 committed by GitHub
parent 74854387cd
commit 9d97724401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -41,6 +41,7 @@ _This release is scheduled to be released on 2024-01-01._
- Fix calendar events sometimes not respecting deleted events (#3250) - Fix calendar events sometimes not respecting deleted events (#3250)
- Fix electron loadurl locally on Windows when address "0.0.0.0" (#2550) - Fix electron loadurl locally on Windows when address "0.0.0.0" (#2550)
- Fix updatanotification (update_helper.js): catch error if reponse is not an JSON format (check PM2) - Fix updatanotification (update_helper.js): catch error if reponse is not an JSON format (check PM2)
- Fix missing typeof in calendar module
## [2.25.0] - 2023-10-01 ## [2.25.0] - 2023-10-01

View File

@ -130,13 +130,13 @@ Module.register("calendar", {
selfSignedCert: calendar.selfSignedCert selfSignedCert: calendar.selfSignedCert
}; };
if (calendar.symbolClass === "undefined" || calendar.symbolClass === null) { if (typeof calendar.symbolClass === "undefined" || calendar.symbolClass === null) {
calendarConfig.symbolClass = ""; calendarConfig.symbolClass = "";
} }
if (calendar.titleClass === "undefined" || calendar.titleClass === null) { if (typeof calendar.titleClass === "undefined" || calendar.titleClass === null) {
calendarConfig.titleClass = ""; calendarConfig.titleClass = "";
} }
if (calendar.timeClass === "undefined" || calendar.timeClass === null) { if (typeof calendar.timeClass === "undefined" || calendar.timeClass === null) {
calendarConfig.timeClass = ""; calendarConfig.timeClass = "";
} }