Skip to content

Commit 71b91c8

Browse files
CopilotPDowney
andauthored
Address code review: trim category name in value branch and explicit length check
Agent-Logs-Url: https://github.com/EngineScript/EngineScript/sessions/d05756ba-edf7-4e3a-91a5-471a65796ca2 Co-authored-by: PDowney <[email protected]>
1 parent 7e5eee2 commit 71b91c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

config/var/www/admin/control-panel/external-services/external-services.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ export class ExternalServicesManager {
13111311
serviceKeys.forEach((key) => {
13121312
const definition = SERVICE_DEFINITIONS[key] || {};
13131313
const category = typeof definition.category === 'string' && definition.category.trim()
1314-
? definition.category
1314+
? definition.category.trim()
13151315
: 'Uncategorized';
13161316

13171317
if (!servicesByCategory.has(category)) {
@@ -1325,7 +1325,7 @@ export class ExternalServicesManager {
13251325
// First: known categories in configured display order.
13261326
CATEGORY_ORDER.forEach((category) => {
13271327
const keys = servicesByCategory.get(category);
1328-
if (keys && keys.length) {
1328+
if (keys && keys.length > 0) {
13291329
ordered.push(...keys.sort((a, b) => a.localeCompare(b)));
13301330
servicesByCategory.delete(category);
13311331
}

0 commit comments

Comments
 (0)