Skip to content

Commit

Permalink
fix null not being convertible to std optional in json
Browse files Browse the repository at this point in the history
HJfod committed Dec 10, 2024
1 parent 0aa2449 commit 15a1b34
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions loader/include/Geode/utils/JsonValidation.hpp
Original file line number Diff line number Diff line change
@@ -183,6 +183,7 @@ namespace geode {
}
template <class T>
JsonExpectedValue& into(std::optional<T>& value) {
if (this->isNull()) return *this;
if (auto v = this->tryGet<T>()) {
value.emplace(*std::move(v));
}

0 comments on commit 15a1b34

Please sign in to comment.