You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Desktop: Fixes #4562: Ensure that invalid plugin settings do not crash the application
This commit is contained in:
@@ -1147,6 +1147,8 @@ class Setting extends BaseModel {
|
||||
}
|
||||
|
||||
static async registerSetting(key: string, metadataItem: SettingItem) {
|
||||
if (metadataItem.isEnum && !metadataItem.options) throw new Error('The `options` property is required for enum types');
|
||||
|
||||
this.validateKey(key);
|
||||
|
||||
this.customMetadata_[key] = metadataItem;
|
||||
|
||||
Reference in New Issue
Block a user