mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-22 05:51:52 +00:00
Keep the old class name if the theme fails
This commit is contained in:
parent
21381677e3
commit
470e50a5de
1 changed files with 1 additions and 0 deletions
|
|
@ -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 + '\".');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue