pwa: only add navigation markup when entries are defined (#29427)
This commit is contained in:
parent
f7ff04f42d
commit
a7a8ee2ed1
|
@ -1,4 +1,5 @@
|
|||
{% load combo %}
|
||||
{% if entries|length %}
|
||||
<div class="pwa-navigation" id="pwa-navigation">
|
||||
<div>
|
||||
<ul>
|
||||
|
@ -35,3 +36,4 @@ $('body.authenticated-user li[data-notification-count-url]').each(function(idx,
|
|||
}});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
|
|
@ -28,7 +28,7 @@ def pwa_navigation(context):
|
|||
return ''
|
||||
pwa_navigation_template = template.loader.get_template('combo/pwa/navigation.html')
|
||||
context = {
|
||||
'entries': PwaNavigationEntry.objects.all(),
|
||||
'entries': list(PwaNavigationEntry.objects.all()),
|
||||
'user': context.get('user'),
|
||||
'render_skeleton': context.get('render_skeleton'),
|
||||
'site_base': context['request'].build_absolute_uri('/')[:-1],
|
||||
|
|
Loading…
Reference in New Issue