Skip to content

Commit

Permalink
fix: Emoji.Get Paging Fix ( Fixes #30 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Feb 21, 2024
1 parent 5437aef commit e4015df
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Types/Emoji/Get.ps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ if ($Number) {
}

$selectSplat = @{}
if ($PSCmdlet.PagingParameters.Skip -or $PSCmdlet.PagingParameters.First) {
if (
($PSCmdlet.PagingParameters.Skip -as [int]) -or
($PSCmdlet.PagingParameters.First -as [int])
) {
if ($PSCmdlet.PagingParameters.Skip) {
$selectSplat.Skip = $PSCmdlet.PagingParameters.Skip
}
elseif ($PSCmdlet.PagingParameters.First) {

if ($PSCmdlet.PagingParameters.First) {
$selectSplat.First = $PSCmdlet.PagingParameters.First
}
}
Expand All @@ -63,7 +67,6 @@ if ($name -or $number) {
} else {
$allNamedEmoji
}

}
elseif ($Block) {
if ($selectSplat.Count) {
Expand Down

0 comments on commit e4015df

Please sign in to comment.