Change Preset Type and Contains (#2789)

This commit is contained in:
Martin Wiethan 2024-09-23 19:34:45 +02:00 committed by GitHub
parent 02751c706d
commit 182fe09b64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -57,7 +57,6 @@ function Invoke-WPFImpex {
}
}
$flattenedJson = [string]$flattenedJson
Invoke-WPFPresets -preset $flattenedJson -imported $true
}
}

View File

@ -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"