fix warning message display on subsequently loaded news

This commit is contained in:
imperosol
2025-02-25 11:53:02 +01:00
parent 94d2c5660a
commit 01c92feb40
2 changed files with 3 additions and 2 deletions

View File

@ -83,7 +83,8 @@
so it's still reasonable #}
<div
{% if news is integer or news is string %}
x-data="{ nbEvents: nbModerated() }"
x-data="{ nbEvents: 0 }"
x-init="nbEvents = await nbToModerate()"
{% else %}
x-data="{ nbEvents: {{ news.dates.count() }} }"
{% endif %}