mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
[FLASK] Fix crash when uninstalling snap (#15799)
* Fix crash when uninstalling snap * Run lint
This commit is contained in:
parent
b16606156f
commit
8226322244
@ -54,7 +54,9 @@ function ViewSnap() {
|
||||
const connectedSubjects = useSelector((state) =>
|
||||
getSubjectsWithPermission(state, snap?.permissionName),
|
||||
);
|
||||
const permissions = useSelector((state) => getPermissions(state, snap?.id));
|
||||
const permissions = useSelector(
|
||||
(state) => snap && getPermissions(state, snap.id),
|
||||
);
|
||||
const dispatch = useDispatch();
|
||||
const onDisconnect = (connectedOrigin, snapPermissionName) => {
|
||||
dispatch(
|
||||
@ -142,7 +144,9 @@ function ViewSnap() {
|
||||
{t('snapAccess', [snap.manifest.proposedName])}
|
||||
</Typography>
|
||||
<Box width={FRACTIONS.TEN_TWELFTHS}>
|
||||
<PermissionsConnectPermissionList permissions={permissions} />
|
||||
<PermissionsConnectPermissionList
|
||||
permissions={permissions ?? {}}
|
||||
/>
|
||||
</Box>
|
||||
</div>
|
||||
<div className="view-snap__section">
|
||||
|
Loading…
Reference in New Issue
Block a user