We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb2d6e5 commit 76fcfe9Copy full SHA for 76fcfe9
platforms/eVoting/src/app/(app)/create/page.tsx
@@ -82,8 +82,10 @@ export default function CreatePoll() {
82
if (aChartered && !bChartered) return -1;
83
if (!aChartered && bChartered) return 1;
84
85
- // If both have same charter status, sort by name
86
- return a.name.localeCompare(b.name);
+ // If both have same charter status, sort by name (with null safety)
+ const aName = a.name || "";
87
+ const bName = b.name || "";
88
+ return aName.localeCompare(bName);
89
});
90
};
91
0 commit comments