Skip to content

Commit cb17dbc

Browse files
committed
skip unnecessary recursion
1 parent 1f8e173 commit cb17dbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/ratelimit-header-parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {
77

88
export function parseRateLimit(input: ResponseOrHeadersObject, options?: RateLimitOptions): RateLimit | undefined {
99
if ('headers' in input && typeof input.headers === 'object' && !Array.isArray(input.headers)) {
10-
return parseRateLimit(input.headers, options)
10+
return parseHeadersObject(input.headers, options)
1111
} else if ('getHeaders' in input && typeof input.getHeaders === 'function') {
12-
return parseRateLimit(input.getHeaders(), options)
12+
return parseHeadersObject(input.getHeaders(), options)
1313
} else {
1414
return parseHeadersObject(input, options)
1515
}

0 commit comments

Comments
 (0)