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
2 changed files with 4 additions and 3 deletions

View File

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