Skip to content

Commit

Permalink
Merge pull request #1195 from HeeL/improve-math-max-usage
Browse files Browse the repository at this point in the history
Improve Math.max usage
  • Loading branch information
Nevon authored Sep 29, 2021
2 parents 9529b12 + 49c92ee commit e99be62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocol/requests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const findApiName = apiKey => names[keys.indexOf(apiKey)]
const lookup = versions => (apiKey, definition) => {
const version = versions[apiKey]
const availableVersions = definition.versions.map(Number)
const bestImplementedVersion = Math.max.apply(this, availableVersions)
const bestImplementedVersion = Math.max(...availableVersions)

if (!version || version.maxVersion == null) {
throw new KafkaJSServerDoesNotSupportApiKey(
Expand Down

0 comments on commit e99be62

Please sign in to comment.