fix #5352: remove requests to cookie consent service when not enabled

This commit is contained in:
David Montesinos
2025-06-06 10:05:40 +02:00
committed by GitHub
parent 64ce69d1c7
commit d4f0805108

View File

@ -103,6 +103,9 @@
{
var cookieConsentSetting = SettingService.GetSetting(PageState.Site.Settings, "CookieConsent", string.Empty);
_enabled = !string.IsNullOrEmpty(cookieConsentSetting);
if (!_enabled) return;
_optout = cookieConsentSetting == "optout";
_actioned = await CookieConsentService.IsActionedAsync();
@ -164,4 +167,4 @@
StateHasChanged();
}
}
}
}