Skip to content

Commit 5984049

Browse files
SeeminglySciencedaviwil
authored andcommitted
Fix before switch parameter for Find-Ast
This fixes an issue where the before switch wasn't searching in the correct order.
1 parent 4e0ad0a commit 5984049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/PowerShellEditorServices/Commands/Public/Find-Ast.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function Find-Ast {
9292
# Need to store so we can reverse the collection.
9393
$result = [Linq.Enumerable]::TakeWhile(
9494
$topParent.FindAll({ $true }, $true),
95-
$predicate)
95+
$predicate) -as [System.Management.Automation.Language.Ast[]]
9696

9797
[array]::Reverse($result)
9898
return $result

0 commit comments

Comments
 (0)