[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;
|
||||
hash: string;
|
||||
// Vendor-specific field, contains our own data
|
||||
vendetta: {
|
||||
icon: string;
|
||||
vendetta?: {
|
||||
icon?: string;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export default function PluginCard({ plugin }: PluginCardProps) {
|
|||
<FormRow
|
||||
style={styles.header}
|
||||
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={
|
||||
<FormSwitch
|
||||
value={plugin.enabled}
|
||||
|
|
Loading…
Reference in a new issue