🐛 empty log responds with ']'

This commit is contained in:
William Katz 2021-07-12 17:22:41 -07:00 committed by GitHub
parent eb282de108
commit 66b200be27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ void Log::AddTrans(const Transaction &t) noexcept
const std::string &Log::GetLogs() noexcept
{
if (log_flag.GetChangeState()) //if there are changes
if (log_flag.GetChangeState() && data.size()) //if there are changes
{
//re-generate snapshot
//({\"amount\":1,\"from\":\"\",\"time\":1625943626,\"to\":\"\"}, + (2*max_name_size)+10+10) * # of logs) + 1