aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4arrayobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4arrayobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4arrayobject.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
index 6c677e856f..d3c16bc2c0 100644
--- a/src/qml/jsruntime/qv4arrayobject.cpp
+++ b/src/qml/jsruntime/qv4arrayobject.cpp
@@ -143,9 +143,8 @@ ReturnedValue ArrayPrototype::method_concat(CallContext *ctx)
ScopedObject thisObject(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!thisObject)
return Encode::undefined();
- ScopedArrayObject instance(scope, thisObject);
- if (instance) {
- result->copyArrayData(instance);
+ if (thisObject->isArrayObject()) {
+ result->copyArrayData(thisObject);
} else {
result->arraySet(0, thisObject);
}