refactor(ivy): improve debug message for assertDataInRange (#30918)

PR Close #30918
This commit is contained in:
Pawel Kozlowski 2019-06-07 15:28:33 +02:00 committed by Igor Minar
parent 87b1a2af4d
commit 016b3f16a3
1 changed files with 2 additions and 1 deletions

View File

@ -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}`);
}