From 04b683ad8b76a5a01186fbc03563623c50b72136 Mon Sep 17 00:00:00 2001 From: olgakup <16910687+olgakup@users.noreply.github.com> Date: Thu, 26 Dec 2024 14:39:26 -0800 Subject: [PATCH] devop: fix sort --- packages/extension/src/ui/action/components/app-menu/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/extension/src/ui/action/components/app-menu/index.vue b/packages/extension/src/ui/action/components/app-menu/index.vue index 6d224979a..f5e12cb58 100644 --- a/packages/extension/src/ui/action/components/app-menu/index.vue +++ b/packages/extension/src/ui/action/components/app-menu/index.vue @@ -159,7 +159,7 @@ const updateSort = (sort: NetworkSort) => { const sortNetworks = (networks: BaseNetwork[], sortBy: NetworkSort) => { return networks.sort((a, b) => { if (sortBy.name === NetworkSortOption.Name) { - return sortBy.direction + return sortBy.direction === NetworkSortDirection.Asc ? a.name.localeCompare(b.name) : b.name.localeCompare(a.name); } @@ -184,6 +184,7 @@ const searchNetworks = computed({ } return props.networks; } + //Search Networks const beginsWithName: BaseNetwork[] = []; const beginsWithSpaceName: BaseNetwork[] = []; const includesName: BaseNetwork[] = [];