From d367f6003ffd8853f2ff244a99168fcd83b835b2 Mon Sep 17 00:00:00 2001 From: Peter Schorn Date: Thu, 30 May 2024 10:37:33 -0500 Subject: [PATCH] Fixed a bug that caused `extendPagesConcurrently` to only return the initial page of results: Changed `if maxOffset >= minOffset` to `if minOffset >= maxOffset`. --- CHANGELOG.md | 4 ++++ Sources/SpotifyWebAPI/Other/MiscellaneousUtilities.swift | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a42b8af..4d942958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.0.2] - 6-07-2024 + +* Fixed a bug that caused `extendPagesConcurrently` to only return the initial page of results + ## [3.0.1] - 5-25-2024 * Fixed a bug that causes a runtime crash in `extendPagesConcurrently` when the "limit" property of the Paginig Object is 0. diff --git a/Sources/SpotifyWebAPI/Other/MiscellaneousUtilities.swift b/Sources/SpotifyWebAPI/Other/MiscellaneousUtilities.swift index aaf99004..a9999efe 100644 --- a/Sources/SpotifyWebAPI/Other/MiscellaneousUtilities.swift +++ b/Sources/SpotifyWebAPI/Other/MiscellaneousUtilities.swift @@ -253,7 +253,7 @@ public func generatePageOffsets( maxOffset = absoluteMaxOffset } - if maxOffset >= minOffset { + if minOffset >= maxOffset { return [] }