diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/v4/qv4runtime.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/v4/qv4runtime.cpp b/src/v4/qv4runtime.cpp index 955236f8b5..8787fcba66 100644 --- a/src/v4/qv4runtime.cpp +++ b/src/v4/qv4runtime.cpp @@ -182,11 +182,7 @@ Function *__qmljs_register_function(ExecutionContext *ctx, String *name, void __qmljs_delete_subscript(ExecutionContext *ctx, Value *result, const Value &base, const Value &index) { if (Object *o = base.asObject()) { - uint n = UINT_MAX; - if (index.isInteger()) - n = index.integerValue(); - else if (index.isDouble()) - n = index.doubleValue(); + uint n = index.asArrayIndex(); if (n < UINT_MAX) { Value res = Value::fromBoolean(o->deleteIndexedProperty(ctx, n)); if (result) |