Merge pull request #1581 from mattermost/font-fix

Stop firefox from crashing due to fonts
Этот коммит содержится в:
Christopher Speller
2015-12-02 12:25:15 -05:00
родитель 2b7ce16ea9 13e55cd8ec
Коммит 8c7dd0561d

Просмотреть файл

@@ -696,8 +696,10 @@ export function applyTheme(theme) {
export function applyFont(fontName) {
const body = document.querySelector('body');
body.classList.forEach((className) => {
if (className.lastIndexOf('font') === 0) {
const keys = Object.getOwnPropertyNames(body.classList);
keys.forEach((k) => {
const className = body.classList[k];
if (className && className.lastIndexOf('font') === 0) {
body.classList.remove(className);
}
});