data endpoint for entity 90008 (aka. a website)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: if visitor has no visits while undoing visit remove entry

dusk 3877d9a5 71cb6e68

+6 -1
+6 -1
src/lib/visits.ts
··· 46 46 if (visitors.has(id)) { 47 47 const visitor = visitors.get(id) ?? { visits: [] }; 48 48 visitor?.visits.pop(); 49 - visitors.set(id, visitor); 49 + // if not enough visits remove 50 + if (visitor?.visits.length === 0) { 51 + visitors.delete(id); 52 + } else { 53 + visitors.set(id, visitor); 54 + } 50 55 } 51 56 lastVisitors.set(visitors); 52 57 };