Fixed BUG-121: crashing when cannot find a match when searching

This commit is contained in:
2024-01-01 11:49:41 +11:00
parent 9c4da5ec6f
commit 262efd89d4
3 changed files with 7 additions and 2 deletions

View File

@@ -66,7 +66,7 @@
</button>
<span class="sm-txt my-auto">&nbsp;{{OPT.how_many}} files&nbsp;</span>
{% set nxt_disabled="" %}
{% if entry_data|length < OPT.how_many|int %}
{% if entry_data and entry_data|length < OPT.how_many|int %}
{% set nxt_disabled="disabled" %}
{% endif %}
<button aria-label="next" id="next" {{nxt_disabled}} name="next" class="next sm-txt btn btn-outline-secondary">
@@ -149,6 +149,9 @@
</div>
{% endif %}
{% endif %}
{% if not entry_data %}
<span class="alert alert-danger p-2 col-auto"> No matches for: '{{search_term}}'</span>
{% endif %}
{% for obj in entry_data %}
{% if loop.index==1 and OPT.folders %}
{% if OPT.cwd != OPT.root %}