Skip to content

Commit 2a820fd

Browse files
committed
Minor formatting and flip the null check
1 parent 9f76be4 commit 2a820fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/CIPPCore/Public/GraphHelper/New-ExoRequest.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function New-ExoRequest {
44
Internal
55
#>
66
[CmdletBinding(DefaultParameterSetName = 'ExoRequest')]
7-
Param(
7+
param(
88
[Parameter(Mandatory = $true, ParameterSetName = 'ExoRequest')]
99
[string]$cmdlet,
1010

@@ -43,7 +43,7 @@ function New-ExoRequest {
4343
$token = Get-GraphToken -Tenantid $tenantid -scope "$Resource/.default" -AsApp:$AsApp.IsPresent
4444

4545
if ($cmdParams) {
46-
#if cmdparams is a pscustomobject, convert to hashtable, otherwise leave as is
46+
#if cmdParams is a pscustomobject, convert to hashtable, otherwise leave as is
4747
$Params = $cmdParams
4848
} else {
4949
$Params = @{}
@@ -145,7 +145,7 @@ function New-ExoRequest {
145145
} until ($null -eq $URL)
146146

147147
Write-Verbose ($ResponseHeaders | ConvertTo-Json)
148-
if ($ReturnedData.'@adminapi.warnings' -and $ReturnedData.value -eq $null) {
148+
if ($ReturnedData.'@adminapi.warnings' -and $null -eq $ReturnedData.value) {
149149
$ReturnedData.value = $ReturnedData.'@adminapi.warnings'
150150
}
151151
} catch {

0 commit comments

Comments
 (0)