Skip to content

Commit

Permalink
fix: #256 non-string properties weren't supported
Browse files Browse the repository at this point in the history
  • Loading branch information
Almamu committed Nov 8, 2024
1 parent 7a4324b commit f71136f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WallpaperEngine/Core/Projects/CPropertyCombo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CPropertyCombo* CPropertyCombo::fromJSON (json data, const std::string& name) {
const auto text = jsonFindDefault<std::string> (data, "text", "");
const auto options = jsonFindRequired (data, "options", "Options for a property combo is required");

auto* combo = new CPropertyCombo (name, text, *value);
auto* combo = new CPropertyCombo (name, text, value->dump ());

if (!options->is_array ())
sLog.exception ("Property combo options should be an array");
Expand All @@ -27,7 +27,7 @@ CPropertyCombo* CPropertyCombo::fromJSON (json data, const std::string& name) {
auto label = jsonFindRequired (cur, "label", "Label is required for a property combo option");
auto propertyValue = jsonFindRequired (cur, "value", "Value is required for a property combo option");

combo->addValue (*label, *propertyValue);
combo->addValue (*label, propertyValue->dump());
}

return combo;
Expand Down

0 comments on commit f71136f

Please sign in to comment.