Index: Source/bindings/templates/methods.cpp |
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
index 141e5d6fc4aeba76507bcc6e9e7d6d64846d59dc..71336908ed341d74bd1d874fd74ebef9069038cb 100644 |
--- a/Source/bindings/templates/methods.cpp |
+++ b/Source/bindings/templates/methods.cpp |
@@ -70,7 +70,7 @@ |
{% endif %} |
{% for argument in method.arguments %} |
{% if argument.default_value %} |
- if (!info[{{argument.index}}]->IsUndefined()) { |
+ if (info.Length() > {{argument.index}}) { |
{{generate_argument(method, argument, world_suffix) | indent(8)}} |
} else { |
{{argument.name}} = {{argument.default_value}}; |