This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(filters): always call
splice()
with 2 arguments or more
When calling `.splice()` without a 2nd argument (`deleteCount`), most browsers will splice to the end of the array. As it turns out, this is the behavior specified in [ES2015][es6]. In [ES5][es5], the spec seems to imply that nothing should happen. To avoid inconsistent behavior among browsers implementing different versions of the EcmaScript standart or when ES5 shims are included (e.g. https://github.com/es-shims/es5-shim/), this commit ensures that all calls to `.splice()` provide at least two arguments. [es5]: http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.12 [es6]: http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.splice Fixes #14467 Closes #14489
- Loading branch information