Skip to content

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

FIX: lazy load category badge color (#34613)

David Battersbycb118d03c4d6
diff --git a/app/assets/javascripts/discourse/app/lib/hashtag-types/category.js b/app/assets/javascripts/discourse/app/lib/hashtag-types/category.js
index 228daf1ef7e..b992a6aa4b0 100644
--- a/app/assets/javascripts/discourse/app/lib/hashtag-types/category.js
+++ b/app/assets/javascripts/discourse/app/lib/hashtag-types/category.js
@@ -46,9 +46,9 @@ export default class CategoryHashtagType extends HashtagTypeBase {
let style;
if (parentColor) {
style = `background: linear-gradient(-90deg, #${color} 50%, #${parentColor} 50%);`;
- } else if (categoryOrHashtag.styleType === "icon") {
+ } else if (categoryOrHashtag.style_type === "icon") {
style = `color: #${color};`;
- } else if (categoryOrHashtag.styleType === "square") {
+ } else if (categoryOrHashtag.style_type === "square") {
style = `background-color: #${color};`;
} else {
return [];