Skip to content

Commit c7f4cff

Browse files
committed
fix: handle static model_params for geojson::PropertyMap overload
1 parent a879152 commit c7f4cff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/realizations/catchment/Formulation_Manager.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ namespace realization {
589589
void parse_external_model_params(geojson::PropertyMap& model_params, const geojson::Feature catchment_feature) {
590590
geojson::PropertyMap attr {};
591591
for (decltype(auto) param : model_params) {
592-
if (!param.second.has_key("source")) {
592+
// Check for type to short-circuit. If param.second is not an object, `.has_key()` will throw
593+
if (param.second.get_type() != geojson::PropertyType::Object || !param.second.has_key("source")) {
593594
attr.emplace(param.first, param.second);
594595
continue;
595596
}

0 commit comments

Comments
 (0)