diff --git a/functions/public/Invoke-WPFImpex.ps1 b/functions/public/Invoke-WPFImpex.ps1 index d97f025e..32539750 100644 --- a/functions/public/Invoke-WPFImpex.ps1 +++ b/functions/public/Invoke-WPFImpex.ps1 @@ -56,8 +56,7 @@ function Invoke-WPFImpex { } } } - - $flattenedJson = [string]$flattenedJson + Invoke-WPFPresets -preset $flattenedJson -imported $true } } diff --git a/functions/public/Invoke-WPFPresets.ps1 b/functions/public/Invoke-WPFPresets.ps1 index 90493899..1535ffe5 100644 --- a/functions/public/Invoke-WPFPresets.ps1 +++ b/functions/public/Invoke-WPFPresets.ps1 @@ -17,7 +17,7 @@ function Invoke-WPFPresets { param ( [Parameter(position=0)] - [string]$preset = "", + [Array]$preset = "", [Parameter(position=1)] [bool]$imported = $false, @@ -51,7 +51,7 @@ function Invoke-WPFPresets { } # Check if the checkbox name exists in the flattened JSON hashtable - if ($CheckBoxesToCheck.Contains($checkboxName)) { + if ($CheckBoxesToCheck -contains $checkboxName) { # If it exists, set IsChecked to true $sync.$checkboxName.IsChecked = $true Write-Debug "$checkboxName is checked"