Skip to content

Commit

Permalink
calendar: Adapt for JSON.parse returning null in capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
opto authored and kewisch committed Jan 13, 2025
1 parent 949200e commit e730a7b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,11 @@ class ExtCalendar extends cal.provider.BaseClass {
try {
this.capabilities = JSON.parse(super.getProperty("extensionCapabilities"));
} catch (e) {
this.capabilities = this.extension.manifest.calendar_provider.capabilities || {};
this.capabilities = null;
}

this.capabilities ??= this.extension.manifest.calendar_provider.capabilities || {};

this.extension.emit("calendar.provider.onInit", this);
}
}
Expand Down

0 comments on commit e730a7b

Please sign in to comment.