Index: Source/bindings/templates/methods.cpp |
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
index 4ce408a59b5aa344e0e771e271ffad433a7c281d..5035d8c4bae131db882ed9466077522ade80f2b6 100644 |
--- a/Source/bindings/templates/methods.cpp |
+++ b/Source/bindings/templates/methods.cpp |
@@ -70,7 +70,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const |
{% endif %} |
{% for argument in method.arguments %} |
{% if argument.default_value %} |
- if (info.Length() > {{argument.index}}) { |
+ if (!info[{{argument.index}}]->IsUndefined()) { |
{{generate_argument(method, argument, world_suffix) | indent(8)}} |
} else { |
{{argument.name}} = {{argument.default_value}}; |