From 57fc3d57c12878b5671569e28011b30d4d769893 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 15 Dec 2024 00:54:13 +0100 Subject: [PATCH] Update per_page handling to set default from context when value is zero --- src/functions/public/API/Invoke-GitHubAPI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/public/API/Invoke-GitHubAPI.ps1 b/src/functions/public/API/Invoke-GitHubAPI.ps1 index 09321916..e8c8a918 100644 --- a/src/functions/public/API/Invoke-GitHubAPI.ps1 +++ b/src/functions/public/API/Invoke-GitHubAPI.ps1 @@ -151,7 +151,7 @@ # Use body to create the query string for certain situations if ($Method -eq 'GET') { # If body conatins 'per_page' and its is null, set it to $context.PerPage - if ($Body.ContainsKey('per_page') -and $null -eq $Body['per_page']) { + if ($Body['per_page'] -eq 0) { $Body['per_page'] = $Context.PerPage } $queryString = $Body | ConvertTo-QueryString