Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Bugfix: Change Preset Type and contains check #2789

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions functions/public/Invoke-WPFImpex.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ function Invoke-WPFImpex {
}
}
}

$flattenedJson = [string]$flattenedJson

Invoke-WPFPresets -preset $flattenedJson -imported $true
}
}
4 changes: 2 additions & 2 deletions functions/public/Invoke-WPFPresets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Invoke-WPFPresets {

param (
[Parameter(position=0)]
[string]$preset = "",
[Array]$preset = "",

[Parameter(position=1)]
[bool]$imported = $false,
Expand Down Expand Up @@ -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"
Expand Down