From bca54c57c4e06ca0e7cdb293368e0e38082ffbd1 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Sun, 27 Aug 2023 15:47:21 -0400 Subject: [PATCH] Clear old vote data before ingesting new data. --- src/app/vote.service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/vote.service.ts b/src/app/vote.service.ts index bf880b5..e50cadd 100644 --- a/src/app/vote.service.ts +++ b/src/app/vote.service.ts @@ -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;