fix(channel): harden About-enrich edge cases from review
- apply_channel_details: (branding.get("channel") or {}) so a "channel": null
in brandingSettings can't AttributeError-abort the enrich batch.
- topicLabels: drop empty labels so a malformed topic URL can't render a blank chip.
This commit is contained in:
@@ -38,7 +38,8 @@ function topicLabels(urls: string[]): string[] {
|
||||
} catch {
|
||||
/* keep raw */
|
||||
}
|
||||
seen.add(label.replace(/_/g, " "));
|
||||
label = label.replace(/_/g, " ").trim();
|
||||
if (label) seen.add(label);
|
||||
}
|
||||
return [...seen];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user