From 82b8a9b28ec47e322fb0d0254d0b2677fb5871b1 Mon Sep 17 00:00:00 2001
From: Paul <paulmakles@gmail.com>
Date: Thu, 1 Jul 2021 19:46:50 +0100
Subject: [PATCH] Filter theme keys.

---
 src/context/Theme.tsx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/context/Theme.tsx b/src/context/Theme.tsx
index bb496da..e37f0b6 100644
--- a/src/context/Theme.tsx
+++ b/src/context/Theme.tsx
@@ -101,10 +101,12 @@ export const PRESETS: { [key: string]: Theme } = {
     },
 };
 
+const keys = Object.keys(PRESETS.dark);
 const GlobalTheme = createGlobalStyle<{ theme: Theme }>`
 :root {
 	${(props) =>
         (Object.keys(props.theme) as Variables[]).map((key) => {
+            if (!keys.includes(key)) return;
             return `--${key}: ${props.theme[key]};`;
         })}
 }
-- 
GitLab