Fix Count errors in preview/zone helpers
This commit is contained in:
@@ -72,7 +72,7 @@ function Get-FilePreview {
|
||||
|
||||
function Get-CommonZoneFromHosts {
|
||||
param([string[]]$Hosts)
|
||||
$fqdnHosts = $Hosts | Where-Object { $_ -and $_.Contains(".") }
|
||||
$fqdnHosts = @($Hosts | Where-Object { $_ -and $_.Contains(".") })
|
||||
if (-not $fqdnHosts -or $fqdnHosts.Count -eq 0) { return "" }
|
||||
|
||||
$commonSuffix = $null
|
||||
@@ -852,7 +852,7 @@ $replicationEnabledBox.Add_CheckedChanged({
|
||||
$filePreviewBtn.Add_Click({
|
||||
$path = $fileBox.Text.Trim()
|
||||
if ([string]::IsNullOrWhiteSpace($path)) {
|
||||
$previewHosts = Split-List $hostsBox.Text
|
||||
$previewHosts = @(Split-List $hostsBox.Text)
|
||||
if ($previewHosts.Count -gt 0) {
|
||||
$filePreviewBox.Text = ($previewHosts | Select-Object -First 200) -join [Environment]::NewLine
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user