Skip to content

Commit

Permalink
Simple performance increases in 'Invoke-WPFTab' function - Use where …
Browse files Browse the repository at this point in the history
…method instead of piping the result into Where-Object
  • Loading branch information
og-mrk committed Oct 25, 2024
1 parent f98d3be commit c0e8a14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/public/Invoke-WPFTab.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Invoke-WPFTab {
$tabNumber = [int]($ClickedTab -replace "WPFTab","" -replace "BT","") - 1

$filter = Get-WinUtilVariables -Type ToggleButton | Where-Object {$psitem -like "WPFTab?BT"}
$sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object {
($sync.GetEnumerator()).where{$psitem.Key -in $filter} | ForEach-Object {
if ($ClickedTab -ne $PSItem.name) {
$sync[$PSItem.Name].IsChecked = $false
# $tabNumber = [int]($PSItem.Name -replace "WPFTab","" -replace "BT","") - 1
Expand Down

0 comments on commit c0e8a14

Please sign in to comment.