fix(facade): Fix bug in TS indexOf
startIndex defaults to -1, which in Chrome results in returning -1 regardless of the other parameters. Added regression tests.
This commit is contained in:
@@ -171,7 +171,7 @@ export class ListWrapper {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
static indexOf(array: List<any>, value, startIndex = -1) {
|
||||
static indexOf(array: List<any>, value, startIndex = 0) {
|
||||
return array.indexOf(value, startIndex);
|
||||
}
|
||||
static reduce<T, E>(list: List<T>,
|
||||
|
||||
Reference in New Issue
Block a user