[UI > PluginCard] Fix crash with icon
This commit is contained in:
parent
66e84ecd8d
commit
af936940a0
2 changed files with 3 additions and 3 deletions
4
src/def.d.ts
vendored
4
src/def.d.ts
vendored
|
@ -46,8 +46,8 @@ interface PluginManifest {
|
||||||
main: string;
|
main: string;
|
||||||
hash: string;
|
hash: string;
|
||||||
// Vendor-specific field, contains our own data
|
// Vendor-specific field, contains our own data
|
||||||
vendetta: {
|
vendetta?: {
|
||||||
icon: string;
|
icon?: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ export default function PluginCard({ plugin }: PluginCardProps) {
|
||||||
<FormRow
|
<FormRow
|
||||||
style={styles.header}
|
style={styles.header}
|
||||||
label={`${plugin.manifest.name} by ${plugin.manifest.authors.map(i => i.name).join(", ")}`}
|
label={`${plugin.manifest.name} by ${plugin.manifest.authors.map(i => i.name).join(", ")}`}
|
||||||
leading={<FormRow.Icon source={getAssetIDByName(plugin.manifest.vendetta.icon || "ic_application_command_24px")} />}
|
leading={<FormRow.Icon source={getAssetIDByName(plugin.manifest.vendetta?.icon || "ic_application_command_24px")} />}
|
||||||
trailing={
|
trailing={
|
||||||
<FormSwitch
|
<FormSwitch
|
||||||
value={plugin.enabled}
|
value={plugin.enabled}
|
||||||
|
|
Loading…
Reference in a new issue