Skip to content

Commit

Permalink
Always return a Variant (even Nil) for exported properties. (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
chippmann authored Sep 1, 2024
1 parent d032cc1 commit 6fcc792
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/script/jvm_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,12 @@ void JvmScript::update_script() {
get_script_exported_property_list(&exported_properties);

for (auto& exported_property : exported_properties) {
if(exported_property.type == Variant::OBJECT) { continue;}
Variant default_value;
const String& property_name {exported_property.name};
kotlin_script_instance->get_or_default(property_name, default_value);

if(exported_property.type != Variant::OBJECT) {
kotlin_script_instance->get_or_default(property_name, default_value);
}
exported_members_default_value_cache[property_name] = default_value;
}

Expand Down

0 comments on commit 6fcc792

Please sign in to comment.