DEV: Allow color scheme loading to be used async (#21836)
This commit is contained in:
parent
4a0f77633d
commit
d5b3db409e
|
@ -54,7 +54,7 @@ export function loadColorSchemeStylesheet(
|
|||
darkMode = false
|
||||
) {
|
||||
const themeId = theme_id ? `/${theme_id}` : "";
|
||||
ajax(`/color-scheme-stylesheet/${colorSchemeId}${themeId}.json`).then(
|
||||
return ajax(`/color-scheme-stylesheet/${colorSchemeId}${themeId}.json`).then(
|
||||
(result) => {
|
||||
if (result && result.new_href) {
|
||||
const elementId = darkMode ? "cs-preview-dark" : "cs-preview-light";
|
||||
|
|
Loading…
Reference in New Issue