Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Internal: ViewCollection now supports iterables, so Set can be used h…
Browse files Browse the repository at this point in the history
…ere.
  • Loading branch information
mlewand committed Feb 19, 2020
1 parent 12bc2e3 commit 8e8a16b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/inserttableview.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ export default class InsertTableView extends View {

/**
* @private
* @returns {module:table/ui/inserttableview~TableSizeGridBoxView[]} An array of boxes to be placed in table grid.
* @returns {Set.<module:table/ui/inserttableview~TableSizeGridBoxView>} An array of boxes to be placed in table grid.
*/
_createGridCollection() {
const returnValue = [];
const returnValue = new Set();

// Add grid boxes to table selection view.
for ( let index = 0; index < 100; index++ ) {
Expand All @@ -173,7 +173,7 @@ export default class InsertTableView extends View {
this.set( 'columns', column + 1 );
} );

returnValue.push( boxView );
returnValue.add( boxView );
}

return returnValue;
Expand Down

0 comments on commit 8e8a16b

Please sign in to comment.