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

Commit

Permalink
Changed: used first util instead of manually obtaining first item f…
Browse files Browse the repository at this point in the history
…rom iterator.
  • Loading branch information
scofalik committed Mar 30, 2017
1 parent 86da332 commit 3d94a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/blockquotecommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class BlockQuoteCommand extends Command {
* Updates command's {@link #value} based on the current selection.
*/
refreshValue() {
const firstBlock = this.editor.document.selection.getSelectedBlocks().next().value;
const firstBlock = first( this.editor.document.selection.getSelectedBlocks() );

// In the current implementation, the block quote must be an immediate parent of a block element.
this.value = !!( firstBlock && findQuote( firstBlock ) );
Expand Down

0 comments on commit 3d94a93

Please sign in to comment.