From 1104a9d91920682d4c9b2b6d3241c96ee2cbb604 Mon Sep 17 00:00:00 2001 From: Vishnu Mohandas Date: Wed, 17 Feb 2021 14:46:20 +0530 Subject: [PATCH] Return early if key is null --- src/pages/gallery/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/gallery/index.tsx b/src/pages/gallery/index.tsx index 79b68a949..f035c322a 100644 --- a/src/pages/gallery/index.tsx +++ b/src/pages/gallery/index.tsx @@ -121,6 +121,7 @@ export default function Gallery(props) { const key = getKey(SESSION_KEYS.ENCRYPTION_KEY); if (!key) { router.push('/'); + return; } const main = async () => { const data = await localFiles();