Fix hasProperty internal method
authorLars Knoll <lars.knoll@digia.com>
Wed, 12 Dec 2012 08:00:19 +0000 (09:00 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Wed, 12 Dec 2012 08:09:55 +0000 (09:09 +0100)
Change-Id: Ifd0b19d6ff011bb85475e6654681a022c8f58e2d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_objects.cpp

index 431d508..d7d0365 100644 (file)
@@ -255,8 +255,8 @@ void Object::__put__(ExecutionContext *ctx, String *name, Value value)
 // Section 8.12.6
 bool Object::__hasProperty__(const ExecutionContext *ctx, String *name) const
 {
-    if (members)
-        return members->find(name) != 0;
+    if (members && members->find(name) != 0)
+        return true;
 
     return prototype ? prototype->__hasProperty__(ctx, name) : false;
 }