Skip to content

Commit

Permalink
Replace Array.fill with lodash.times
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Aug 3, 2017
1 parent 428d791 commit aa5d4ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/library/categories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Component } from '@wordpress/element';
import { Placeholder, Spinner } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { unescape } from 'lodash';
import { times, unescape } from 'lodash';

/**
* Internal dependencies
Expand Down Expand Up @@ -159,7 +159,7 @@ registerBlockType( 'core/categories', {

return [
<option key={ category.id }>
{ new Array( level * 3 ).fill( '\xa0' ) }
{ times( level * 3, () => '\xa0' ) }
{ this.renderCategoryName( category ) }
{
!! showPostCounts
Expand Down

0 comments on commit aa5d4ad

Please sign in to comment.