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

Commit

Permalink
Fix: Use numbers instead of booleans in Array.sort.
Browse files Browse the repository at this point in the history
  • Loading branch information
scofalik committed Jul 27, 2018
1 parent ecf72fe commit 00fbf7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dev-utils/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export function stringify( node, selectionOrPositionOrRange = null, markers = nu

if ( markers ) {
// To provide stable results, sort markers by name.
markers = Array.from( markers ).sort( ( a, b ) => a.name < b.name );
markers = Array.from( markers ).sort( ( a, b ) => a.name < b.name ? 1 : -1 );

for ( const marker of markers ) {
downcastDispatcher.convertMarkerAdd( marker.name, marker.getRange(), writer );
Expand Down

0 comments on commit 00fbf7f

Please sign in to comment.