mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #29899 from overleaf/mj-dark-mode-file-flash
[web] Avoid background color flash when switching files GitOrigin-RevId: e5d2fbb631fd54d195b9cb51b2a9db584d205138
This commit is contained in:
committed by
Copybot
parent
ff5b469b20
commit
7c1a225be4
@@ -287,7 +287,8 @@ const loadSelectedTheme = async (editorTheme: string) => {
|
||||
const themes = getMeta('ol-editorThemes') || []
|
||||
const legacyThemes = getMeta('ol-legacyEditorThemes') || []
|
||||
const themeExists =
|
||||
themes.includes(editorTheme) || legacyThemes.includes(editorTheme)
|
||||
themes.some(theme => theme.name === editorTheme) ||
|
||||
legacyThemes.some(theme => theme.name === editorTheme)
|
||||
if (!themeExists) {
|
||||
editorTheme = 'textmate' // fallback to default if the theme is not found
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user