diff --git a/src/Logic/Web/MangroveReviews.ts b/src/Logic/Web/MangroveReviews.ts index 38ee66321..d043b539f 100644 --- a/src/Logic/Web/MangroveReviews.ts +++ b/src/Logic/Web/MangroveReviews.ts @@ -5,6 +5,7 @@ import { Feature, Position } from "geojson" import { GeoOperations } from "../GeoOperations" import { SpecialVisualizationState } from "../../UI/SpecialVisualization" import { WithUserRelatedState } from "../../Models/ThemeViewState/WithUserRelatedState" +import { IsOnline } from "./IsOnline" export interface ReviewCollection { readonly subjectUri?: Store @@ -238,11 +239,14 @@ export default class FeatureReviews implements ReviewCollection { if (!loadingAllowed.data) { return } + if (!IsOnline.isOnline.data) { + return + } const reviews = await MangroveReviews.getReviews({ sub }) console.debug("Got reviews for", feature, reviews, sub) this.addReviews(reviews.reviews, this._name.data) }, - [this._name, loadingAllowed] + [this._name, loadingAllowed, IsOnline.isOnline] ) /* We also construct all subject queries _without_ encoding the name to work around a previous bug * See https://github.com/giggls/opencampsitemap/issues/30