Skip to content

Commit

Permalink
Change Preset Type and Contains (ChrisTitusTech#2789)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marterich authored and Real-MullaC committed Sep 29, 2024
1 parent a37917e commit 16d2835
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
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

0 comments on commit 16d2835

Please sign in to comment.