Fix topics plugin to avoid displaying "And 0 more..." when they are less topics than limit
This commit is contained in:
@@ -57,6 +57,7 @@
|
|||||||
if ((mode === "starred")&&(limit > 0)) {
|
if ((mode === "starred")&&(limit > 0)) {
|
||||||
console.debug(`metrics/compute/${login}/plugins > topics > keeping only ${limit} topics`)
|
console.debug(`metrics/compute/${login}/plugins > topics > keeping only ${limit} topics`)
|
||||||
const removed = topics.splice(limit)
|
const removed = topics.splice(limit)
|
||||||
|
if (removed.length)
|
||||||
topics.push({name:`And ${removed.length} more...`, description:removed.map(({name}) => name).join(", "), icon:null})
|
topics.push({name:`And ${removed.length} more...`, description:removed.map(({name}) => name).join(", "), icon:null})
|
||||||
}
|
}
|
||||||
//Convert icons to base64
|
//Convert icons to base64
|
||||||
|
|||||||
Reference in New Issue
Block a user