Skip to content

Commit 742032a

Browse files
author
JustinGrote
committed
Bugfix: Continue broke higher in the script, causing regression
1 parent 89b9d64 commit 742032a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

PoshNmap/Private/FormatStringOut.ps1

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ Change what is shown when the supplied object is cast to a string. Use $this to
1212
)
1313

1414
process {
15-
if (-not $inputObject) {continue}
16-
$AddMemberParams = @{
17-
InputObject = $inputObject
18-
MemberType = 'ScriptMethod'
19-
Name = 'ToString'
20-
Force = $true
21-
Value = $scriptBlock
15+
if ($inputObject) {
16+
$AddMemberParams = @{
17+
InputObject = $inputObject
18+
MemberType = 'ScriptMethod'
19+
Name = 'ToString'
20+
Force = $true
21+
Value = $scriptBlock
22+
}
23+
Add-Member @AddMemberParams
2224
}
23-
Add-Member @AddMemberParams
2425
}
2526

2627
}

0 commit comments

Comments
 (0)