Fix error when there are no products

This commit is contained in:
Sijmen 2019-11-03 15:29:54 +01:00
parent aa26e70fbd
commit f342714430
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -36,7 +36,7 @@ cart([Name|Items]) -->
products_view(_Request) :- products_view(_Request) :-
http_session_id(SessionId), http_session_id(SessionId),
bagof(product(X, Y), product(X, Y), Products), (bagof(product(X, Y), product(X, Y), Products); Products = []),
(bagof(Name, cart_entry(SessionId, Name), CartEntries); CartEntries = []), (bagof(Name, cart_entry(SessionId, Name), CartEntries); CartEntries = []),
reply_html_page( reply_html_page(
[ [