diff options
Diffstat (limited to 'src/qml/jsruntime/qv4reflect.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4reflect.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4reflect.cpp b/src/qml/jsruntime/qv4reflect.cpp index 2bfd2bc401..20ea39d4e5 100644 --- a/src/qml/jsruntime/qv4reflect.cpp +++ b/src/qml/jsruntime/qv4reflect.cpp @@ -192,16 +192,11 @@ ReturnedValue Reflect::method_has(const FunctionObject *f, const Value *, const Value undef = Primitive::undefinedValue(); const Value *index = argc > 1 ? &argv[1] : &undef; - bool hasProperty = false; - uint n = index->asArrayIndex(); - if (n < UINT_MAX) { - (void) o->get(n, &hasProperty); - return Encode(hasProperty); - } - ScopedPropertyKey name(scope, index->toPropertyKey(scope.engine)); if (scope.engine->hasException) return false; + + bool hasProperty = false; (void) o->get(name, nullptr, &hasProperty); return Encode(hasProperty); } |