From 4a9e05cf17e0234e1e167d79527c79ffd6897a52 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 23 Dec 2022 21:08:41 +0100 Subject: [PATCH] Updated prop to make it required as in Shlink v2.8.0 or newer --- src/visits/services/VisitsParser.ts | 2 +- src/visits/types/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {