Skip to content

Commit 76fcfe9

Browse files
committed
fix: evoting cache
1 parent eb2d6e5 commit 76fcfe9

File tree

1 file changed

+4
-2
lines changed
  • platforms/eVoting/src/app/(app)/create

1 file changed

+4
-2
lines changed

platforms/eVoting/src/app/(app)/create/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ export default function CreatePoll() {
8282
if (aChartered && !bChartered) return -1;
8383
if (!aChartered && bChartered) return 1;
8484

85-
// If both have same charter status, sort by name
86-
return a.name.localeCompare(b.name);
85+
// If both have same charter status, sort by name (with null safety)
86+
const aName = a.name || "";
87+
const bName = b.name || "";
88+
return aName.localeCompare(bName);
8789
});
8890
};
8991

0 commit comments

Comments
 (0)