mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:50:00 +08:00
FIX: Ensure badge description is updated when routing without loading state (#12196)
This commit is contained in:
parent
de32fa299d
commit
d22ab6fe22
|
@ -22,14 +22,13 @@ export default Component.extend({
|
|||
}
|
||||
},
|
||||
|
||||
@discourseComputed("size")
|
||||
summary(size) {
|
||||
@discourseComputed("size", "badge.long_description", "badge.description")
|
||||
summary(size, longDescription, description) {
|
||||
if (size === "large") {
|
||||
const longDescription = this.get("badge.long_description");
|
||||
if (!isEmpty(longDescription)) {
|
||||
return emojiUnescape(sanitize(longDescription));
|
||||
}
|
||||
}
|
||||
return sanitize(this.get("badge.description"));
|
||||
return sanitize(description);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user