refactor(ivy): improve debug message for assertDataInRange (#30918)
PR Close #30918
This commit is contained in:
parent
87b1a2af4d
commit
016b3f16a3
|
@ -80,5 +80,6 @@ export function assertDomNode(node: any) {
|
|||
|
||||
|
||||
export function assertDataInRange(arr: any[], index: number) {
|
||||
assertLessThan(index, arr ? arr.length : 0, 'index expected to be a valid data index');
|
||||
const maxLen = arr ? arr.length : 0;
|
||||
assertLessThan(index, maxLen, `Index expected to be less than ${maxLen} but got ${index}`);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue