|
|
@@ -114,13 +114,7 @@ export default class ViewCollection extends Collection {
|
|
|
return Promise.all( this._addPromises )
|
|
|
// Then begin the process of destroying the children.
|
|
|
.then( () => {
|
|
|
- let destroyPromises = [];
|
|
|
-
|
|
|
- for ( let view of this ) {
|
|
|
- destroyPromises.push( view.destroy() );
|
|
|
- }
|
|
|
-
|
|
|
- return Promise.all( destroyPromises );
|
|
|
+ return Promise.all( Array.from( this, view => view.destroy() ) );
|
|
|
} );
|
|
|
}
|
|
|
|