mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
修复array的findIndex查找不到undefined元素下标的问题
https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8D8UH Signed-off-by: 杨云飞 <yangyunfei19@h-partners.com>
This commit is contained in:
parent
93400834ab
commit
87d5c49bdb
@ -330,6 +330,9 @@ JSTaggedValue JSStableArray::HandleFindIndexOfStable(JSThread *thread, JSHandle<
|
||||
// Elements of thisObjHandle may change.
|
||||
array.Update(thisObjHandle->GetElements());
|
||||
kValue.Update(array->Get(k));
|
||||
if(kValue->IsHole()) {
|
||||
kValue.Update(JSTaggedValue::Undefined());
|
||||
}
|
||||
EcmaRuntimeCallInfo *info =
|
||||
EcmaInterpreter::NewRuntimeCallInfo(thread, callbackFnHandle, thisArgHandle, undefined, argsLength);
|
||||
RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread);
|
||||
|
Loading…
Reference in New Issue
Block a user