Skip to content

Commit

Permalink
Iterating directly over the values of the children map
Browse files Browse the repository at this point in the history
  • Loading branch information
aiday-mar committed Aug 9, 2022
1 parent edb9d7d commit ea94d0c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ export class StickyLineCandidateProvider extends Disposable {

class StickyOutlineElement {
public static fromOutlineModel(outlineModel: OutlineModel | OutlineElement | OutlineGroup): StickyOutlineElement {
const children = [...outlineModel.children].map(entry =>
StickyOutlineElement.fromOutlineModel(entry[1])
const children = [...outlineModel.children.values()].map(child =>
StickyOutlineElement.fromOutlineModel(child)
);
children.sort((child1, child2) => {
if (!child1.range || !child2.range) {
Expand Down

0 comments on commit ea94d0c

Please sign in to comment.