mirror of
https://gitee.com/openharmony/commonlibrary_ets_utils
synced 2025-02-17 08:20:55 +00:00
Container list add undefined check in Get
Issue: https://gitee.com/openharmony/commonlibrary_ets_utils/issues/IB553X Signed-off-by: yaoyuan <yuanyao14@huawei.com> Change-Id: I2c8516fc3a5b206d6dc92b39642c23f1243c10ef
This commit is contained in:
parent
fbffb6d0e0
commit
0f1447bdb7
@ -143,7 +143,7 @@ if (flag || fastList === undefined) {
|
||||
for (let i: number = 0; i < index && current !== undefined; i++) {
|
||||
current = current.next;
|
||||
}
|
||||
return current.element;
|
||||
return current && current.element;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user