From cf5a4a7ff08e45aa8c369122966b3ba222ab7e25 Mon Sep 17 00:00:00 2001 From: Pierre Bertet Date: Thu, 19 Dec 2019 16:40:49 -0300 Subject: [PATCH] Theme: always extend the base theme Even if the passed theme has the same name than an embedded theme, we now always override it with the passed one. --- src/theme/Theme.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/theme/Theme.js b/src/theme/Theme.js index 68b37fc15..b314e99d6 100644 --- a/src/theme/Theme.js +++ b/src/theme/Theme.js @@ -21,14 +21,11 @@ function getTheme(theme) { warn(`Using the theme “${THEME_DEFAULT}”.`) return EMBEDDED_THEMES[THEME_DEFAULT] } + if (typeof theme === 'string' && EMBEDDED_THEMES[theme]) { return EMBEDDED_THEMES[theme] } - if (theme === EMBEDDED_THEMES[theme._name]) { - return theme - } - const baseTheme = EMBEDDED_THEMES[theme._appearance === 'dark' ? 'dark' : 'light']