Skip to content

Commit

Permalink
fix: accept lowercased retries with surrounding space
Browse files Browse the repository at this point in the history
  • Loading branch information
zimeg committed Nov 12, 2024
1 parent 4f678e0 commit e66be35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class Client {
* @returns {import("@slack/web-api").RetryOptions}
*/
retries(option) {
switch (option) {
switch (option?.trim().toUpperCase()) {
case "0":
return { retries: 0 };
case "5":
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class Config {
* Confirm the configurations are correct enough to continue.
*/
validate() {
switch (this.inputs.retries) {
switch (this.inputs.retries.trim().toUpperCase()) {
case this.Retries.ZERO:
case this.Retries.FIVE:
case this.Retries.TEN:
Expand Down
2 changes: 1 addition & 1 deletion src/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default class Webhook {
* @returns {import("axios-retry").IAxiosRetryConfig}
*/
retries(option) {
switch (option) {
switch (option?.trim().toUpperCase()) {
case "0":
return { retries: 0 };
case "5":
Expand Down

0 comments on commit e66be35

Please sign in to comment.