Skip to content

Commit

Permalink
Fix data properties being set to unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Dec 13, 2020
1 parent f38ef2c commit 1a672ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Javinizer/Private/Convert-JVString.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ function Convert-JVString {
$convertedName += "-pt$PartNumber"
}

# Revert any changed properties to null
if ($IsFileName) {
$Data.PSObject.Properties | ForEach-Object {
if ($_.Value -eq 'Unknown' -or $_.Value -eq '') {
$Data."$($_.Name)" = $null
}
}
}

Write-Output $convertedName
}
}

0 comments on commit 1a672ce

Please sign in to comment.