diff --git a/lib/global.js b/lib/global.js index 95c9614a..a080f270 100644 --- a/lib/global.js +++ b/lib/global.js @@ -72,7 +72,8 @@ export function GlobalContextProvider({ children }) { const currentIndex = THEMES.indexOf(theme) const newIndex = currentIndex < THEMES.length - 1 ? currentIndex + 1 : 0 const newTheme = THEMES[newIndex] - const query = { ...router.query, theme: newTheme } + const query = router.query + query.theme = newTheme router.push({ pathname: router.pathname, query }) return newTheme }