Skip to content

A platform for community discussion. Free, open, simple.

FIX: Cannot find currentThemeColorSchemeId when no themeId is present (#11817)

Penar Musaraj73cb083b7b0a
diff --git a/app/assets/javascripts/discourse/app/controllers/preferences/interface.js b/app/assets/javascripts/discourse/app/controllers/preferences/interface.js
index aff0e805b8a..2ae8253e649 100644
--- a/app/assets/javascripts/discourse/app/controllers/preferences/interface.js
+++ b/app/assets/javascripts/discourse/app/controllers/preferences/interface.js
@@ -153,7 +153,7 @@ export default Controller.extend({
"themeId"
)
currentSchemeCanBeSelected(userThemes, userColorSchemes, themeId) {
- if (!userThemes) {
+ if (!userThemes || !themeId) {
return false;
}