Only attempt to show receipts if there are any.

Previously "Receipts:" was still shown.
This commit is contained in:
tastytea 2018-09-14 23:59:20 +02:00
parent 4a9c513b55
commit 08ff4d628b
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.6)
project (whyblocked
VERSION 0.6.1
VERSION 0.6.2
LANGUAGES CXX
)

View File

@ -151,10 +151,13 @@ const bool whyblocked_text::start()
}
cout << std::get<1>(result) << '\n';
cout << "Receipts:\n";
for (const string &url : std::get<2>(result))
if (!std::get<2>(result).empty())
{
cout << " " << url << '\n';
cout << "Receipts:\n";
for (const string &url : std::get<2>(result))
{
cout << " " << url << '\n';
}
}
}
}