From 470e50a5de371807616d326248f6ac9ea3f45625 Mon Sep 17 00:00:00 2001 From: Marcos Moura Date: Wed, 5 Oct 2016 05:52:15 -0300 Subject: [PATCH] Keep the old class name if the theme fails --- src/components/mdTheme/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/mdTheme/index.js b/src/components/mdTheme/index.js index 90f5244..dea8382 100644 --- a/src/components/mdTheme/index.js +++ b/src/components/mdTheme/index.js @@ -130,6 +130,7 @@ const registerDirective = (element, { value, oldValue }) => { if (theme && registedThemes.indexOf(theme) >= 0) { element.classList.add(newClass); } else { + element.classList.add(oldClass); console.warn('Attempted to use unregistered theme "' + theme + '\".'); } }