Fixed a bug that caused the splice method on reactive arrays to behave differently from Array.prototype.splice.
When Array.prototype.splice receives only one argument, all the elements from that index to the end of the array get deleted. But if it receives undefined as its second argument, it treats it as zero, and doesn't delete any elements.
This fix changes reactive splice so that when it only receives one argument, it only passes one argument on to Array.prototype.splice.
Also added a test case for the bug fix, and renamed the file reactive.spec.ts.ts to reactive.spec.ts because the double .ts.ts extension was preventing it from running.
Fixed a bug that caused the
splice
method on reactive arrays to behave differently fromArray.prototype.splice
.When
Array.prototype.splice
receives only one argument, all the elements from that index to the end of the array get deleted. But if it receivesundefined
as its second argument, it treats it as zero, and doesn't delete any elements.This fix changes reactive
splice
so that when it only receives one argument, it only passes one argument on toArray.prototype.splice
.Also added a test case for the bug fix, and renamed the file
reactive.spec.ts.ts
toreactive.spec.ts
because the double.ts.ts
extension was preventing it from running.