Skip to content

Commit

Permalink
Clear old vote data before ingesting new data.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkar598 committed Aug 27, 2023
1 parent 5422566 commit bca54c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/vote.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ export class VoteService {
}

load(rawData: string): boolean {
this.clear();

const lines = rawData.trim().split("\n");
let headerLine = lines.shift();
if (headerLine === undefined) return false;
Expand Down

0 comments on commit bca54c5

Please sign in to comment.