diff --git a/src/visits/services/VisitsParser.ts b/src/visits/services/VisitsParser.ts index 32e6404a..d9826152 100644 --- a/src/visits/services/VisitsParser.ts +++ b/src/visits/services/VisitsParser.ts @@ -82,7 +82,7 @@ export const processStatsFromVisits = (visits: NormalizedVisit[]) => visits.redu ); export const normalizeVisits = map((visit: Visit): NormalizedVisit => { - const { userAgent, date, referer, visitLocation, potentialBot = false } = visit; + const { userAgent, date, referer, visitLocation, potentialBot } = visit; const common = { date, potentialBot, diff --git a/src/visits/types/index.ts b/src/visits/types/index.ts index 14b844f1..0ff67d6b 100644 --- a/src/visits/types/index.ts +++ b/src/visits/types/index.ts @@ -19,7 +19,7 @@ export interface RegularVisit { date: string; userAgent: string; visitLocation: VisitLocation | null; - potentialBot?: boolean; // Optional only when using Shlink older than v2.7 + potentialBot: boolean; } export interface OrphanVisit extends RegularVisit {