From 437d3c3fcbe85e1ef58596de2dcaeca6ce4838de Mon Sep 17 00:00:00 2001 From: xfangfang <2553041586@qq.com> Date: Sun, 12 Nov 2023 10:44:31 +0800 Subject: [PATCH] Update Dialog: Fix json parse failed --- wiliwili/include/fragment/latest_update.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wiliwili/include/fragment/latest_update.hpp b/wiliwili/include/fragment/latest_update.hpp index 38ebfdd3d..e05c4f2f0 100644 --- a/wiliwili/include/fragment/latest_update.hpp +++ b/wiliwili/include/fragment/latest_update.hpp @@ -49,9 +49,11 @@ class ReleaseNote { }; inline void from_json(const nlohmann::json& nlohmann_json_j, ReleaseNote& nlohmann_json_t) { + if (nlohmann_json_j.contains("reactions")) { + nlohmann_json_j.get_to(nlohmann_json_t.reactions); + } NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, tag_name, name, - body, published_at, author, - reactions)); + body, published_at, author)); } class LatestUpdate : public brls::Box {