File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class Http {
3434 throw Error . internal ( "The 'sort' parameter was not of type SortOptions." ) ;
3535 }
3636
37- if ( ! sort . isUnset ( ) ) endpoint += sort . toQueryString ( ) ;
37+ if ( sort . isSet ( ) ) endpoint += sort . toQueryString ( ) ;
3838 await this . #throttler. stallIfRequired ( false ) ;
3939
4040 try {
@@ -134,8 +134,8 @@ class Http {
134134 *
135135 * @return {Array<object> } An array of raw objects.
136136 */
137- async listUntil ( endpoint , shouldContinue , sort ) {
138- if ( ! ( typeof endpoint !== "string" ) ) {
137+ async listUntil ( endpoint , shouldContinue , sort = new SortOptions ( ) ) {
138+ if ( typeof endpoint !== "string" ) {
139139 throw Error . internal ( "The 'endpoint' parameter was not a string." ) ;
140140 } else if ( ! ( sort instanceof SortOptions ) ) {
141141 throw Error . internal ( "The 'sort' parameter was not of type SortOptions." ) ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class SortOptions {
3131 *
3232 * @returns {bool } Whether or not any sort options have been set.
3333 */
34- isUnset ( ) {
34+ isSet ( ) {
3535 return this . sort || this . order || this . page ;
3636 }
3737}
You can’t perform that action at this time.
0 commit comments