Skip to content

Commit

Permalink
[tests] Map order is unreliable
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Jul 2, 2024
1 parent 1dd581f commit 88832c5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,14 @@ class OrganizeImportsFeature {

static function organizeImportGroups(doc:HxTextDocument, context:Context, importGroups:Map<Int, ImportGroup>):Array<TextEdit> {
var edits:Array<TextEdit> = [];
var last = importGroups.get(-1);
importGroups.remove(-1);

for (group in importGroups) {
edits = edits.concat(organizeImportGroup(doc, context, group));
}

if (last != null) edits = edits.concat(organizeImportGroup(doc, context, last));
return edits;
}

Expand Down

0 comments on commit 88832c5

Please sign in to comment.