feat(plugins/settings/components/AssetIcon): safely access nullable asset
This commit is contained in:
parent
7cf05a6f53
commit
9c6ad05e2b
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import type { DiscordModules } from '@revenge-mod/discord/types'
|
|||
import { Components } from '@revenge-mod/discord/ui'
|
||||
|
||||
export default function AssetIcon(props: AssetIconProps) {
|
||||
return <Components.TableRow.Icon source={getAssetByName(props.name)!.id} {...props} />
|
||||
return <Components.TableRow.Icon source={getAssetByName(props.name)?.id!} {...props} />
|
||||
}
|
||||
|
||||
export interface AssetIconProps extends Omit<DiscordModules.Components.TableRowIconProps, 'source'> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue