diff --git a/client/src/components/Roadtrip/RoadtripCorridorPanel.tsx b/client/src/components/Roadtrip/RoadtripCorridorPanel.tsx index e8d1fe2e5..8f8df5aeb 100644 --- a/client/src/components/Roadtrip/RoadtripCorridorPanel.tsx +++ b/client/src/components/Roadtrip/RoadtripCorridorPanel.tsx @@ -332,7 +332,7 @@ export default function RoadtripCorridorPanel({ corridor, routes, onAddPoi, trip /> ) : null} - {tripId && canImport && } + {tripId !== undefined && tripId > 0 && canImport && } {/* What to look for. */} diff --git a/server/src/nest/roadtrip/roadtrip-hazards.service.ts b/server/src/nest/roadtrip/roadtrip-hazards.service.ts index fe112de8d..71f693e4a 100644 --- a/server/src/nest/roadtrip/roadtrip-hazards.service.ts +++ b/server/src/nest/roadtrip/roadtrip-hazards.service.ts @@ -32,7 +32,7 @@ export class RoadtripHazardsService { async read(): Promise { if (this.cached && Date.now() - Date.parse(this.cached.fetchedAt) < 600000) return this.cached; - if (this.pending) return this.pending; + if (this.pending !== undefined) return this.pending; this.pending = this.load(); try { this.cached = await this.pending; return this.cached; } finally { this.pending = undefined; }