modify the list of removebyindex function

issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9MKZA

Signed-off-by: coollixin <lixin581@huawei.com>
This commit is contained in:
coollixin 2024-05-06 16:04:14 +08:00
parent 56cfbeb728
commit e1e44eeaca

View File

@ -164,9 +164,7 @@ JSTaggedValue JSAPIList::RemoveByIndex(JSThread *thread, const JSHandle<JSAPILis
JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::RANGE_ERROR, oss.str().c_str());
THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception());
}
if (index != (nodeLength - 1)) {
list->SetIsOrderedList(false);
}
list->SetIsOrderedList(false);
return singleList->RemoveByIndex(thread, index);
}