mirror of
https://github.com/discourse/discourse.git
synced 2025-02-28 16:29:22 +00:00
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…
x
Reference in New Issue
Block a user