Skip to content

Commit 0dc81c9

Browse files
authored
fix(web-ui): shuffling candidates with line returns (#57)
1 parent 0e63c9b commit 0dc81c9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/web-ui/src/fetchDataFromGitHub.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ async function act(
226226
for (;;) {
227227
lineStart = lineEnd + 1;
228228
lineEnd = ballotData.indexOf("\n", lineStart);
229+
if (lineEnd === lineStart) {
230+
currentCandidate += '\n';
231+
continue;
232+
}
229233
if (lineEnd === -1) {
230234
if (lineStart !== ballotData.length) {
231235
currentCandidate += ballotData.slice(lineStart - 1);

0 commit comments

Comments
 (0)