8
0
فهرست منبع

Internal (utils): Clone an array in a slightly different way.

Marek Lewandowski 5 سال پیش
والد
کامیت
0a0f3cd1f9
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/ckeditor5-utils/src/collection.js

+ 1 - 1
packages/ckeditor5-utils/src/collection.js

@@ -352,7 +352,7 @@ export default class Collection {
 			this._bindToCollection = null;
 		}
 
-		const removedItems = this._items.concat( [] );
+		const removedItems = [ ...this._items ];
 
 		while ( this.length ) {
 			this._remove( 0, true );