Fixed the empty string issue when server returns null (#7633)

This commit is contained in:
Ghufran Zahidi
2020-10-10 07:45:58 +05:30
committed by GitHub
parent 214d81553f
commit c6ab073a29
2 changed files with 2 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ function DeserializeResponse {
[string[]]$ContentTypes
)
If ([string]::IsNullOrEmpty($ReturnType)) { # void response
If ([string]::IsNullOrEmpty($ReturnType) -and $ContentTypes.Count -eq 0) { # void response
return $Response
} Elseif ($ReturnType -match '\[\]$') { # array
return ConvertFrom-Json $Response