Don't fire remove event when Collection remains unchanged

This commit is contained in:
Maximilian Krög
2022-07-30 03:17:48 +02:00
parent 6f539c9ca4
commit 806843f449

View File

@@ -254,6 +254,9 @@ class Collection extends BaseObject {
* @api
*/
removeAt(index) {
if (index < 0 || index >= this.getLength()) {
return undefined;
}
const prev = this.array_[index];
this.array_.splice(index, 1);
this.updateLength_();