fix(core): ObservableArray splice with start only (#9159)

This commit is contained in:
matthewianmorgan
2021-02-01 04:05:37 +10:00
committed by GitHub
parent c4972d7546
commit 3ddfb5c34a
2 changed files with 48 additions and 1 deletions

View File

@@ -246,7 +246,7 @@ export class ObservableArray<T> extends Observable {
*/
splice(start: number, deleteCount?: number, ...items: any): T[] {
const length = this._array.length;
const result = this._array.splice(start, deleteCount, ...items);
const result = arguments.length === 1 ? this._array.splice(start) : this._array.splice(start, deleteCount, ...items);
this.notify(<ChangedData<T>>{
eventName: CHANGE,