Enable strictPropertyInitialization (#11203)
This commit is contained in:
parent
4207d182cd
commit
cfd48b36aa
38 changed files with 97 additions and 117 deletions
|
@ -111,7 +111,7 @@ export const EventEditor: React.FC<IEventEditorProps> = ({ fieldDefs, defaultCon
|
|||
const json = JSON.parse(content);
|
||||
await onSend(fieldData, json);
|
||||
} catch (e) {
|
||||
return _t("Failed to send event!") + ` (${e.toString()})`;
|
||||
return _t("Failed to send event!") + (e instanceof Error ? ` (${e.message})` : "");
|
||||
}
|
||||
return _t("Event sent!");
|
||||
};
|
||||
|
|
|
@ -125,7 +125,7 @@ const EditSetting: React.FC<IEditSettingProps> = ({ setting, onBack }) => {
|
|||
}
|
||||
onBack();
|
||||
} catch (e) {
|
||||
return _t("Failed to save settings.") + ` (${e.message})`;
|
||||
return _t("Failed to save settings.") + (e instanceof Error ? ` (${e.message})` : "");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue