Skip to content

Commit

Permalink
refactor: replace deprecated String.prototype.substr() (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderRoot committed Mar 30, 2022
1 parent 13136e9 commit 79d0d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -270,7 +270,7 @@ RedirectableRequest.prototype._performRequest = function () {
// If specified, use the agent corresponding to the protocol
// (HTTP and HTTPS use different types of agents)
if (this._options.agents) {
var scheme = protocol.substr(0, protocol.length - 1);
var scheme = protocol.slice(0, -1);
this._options.agent = this._options.agents[scheme];
}

Expand Down

0 comments on commit 79d0d8d

Please sign in to comment.