Skip to content

Commit

Permalink
hack for selector throwing
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Sep 2, 2024
1 parent 3ed97f6 commit 736aebd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export default function SnapsConnect({

const SnapsConnectContent = () => {
let trimmedOrigin = (useOriginMetadata(origin) || {})?.hostname;
const { name } = useSelector((state) => getSnapMetadata(state, origin));
const { name } = useSelector((state) =>
// hack around the selector throwing
getSnapMetadata(state, isSnapId(origin) ? origin : `npm:${origin}`),
);

if (isSnapId(origin)) {
trimmedOrigin = name;
Expand Down

0 comments on commit 736aebd

Please sign in to comment.