Skip to content

Commit

Permalink
Ensure regionalEndpoint variable is declared for s3UsEast1RegionalEnd…
Browse files Browse the repository at this point in the history
…point (#4531)

If the file is executed in node strict mode https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#assigning_to_undeclared_variables the line fails. Typically that should not happen because the file does not declare a "use strict" at the top but with some bundlers it can still happen.
  • Loading branch information
workeitel authored Nov 22, 2023
1 parent b12aed6 commit fdb4079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ AWS.util.update(AWS.S3.prototype, {
req.httpRequest.endpoint.hostname.indexOf('s3.amazonaws.com') >= 0
) {
var insertPoint = config.endpoint.indexOf('.amazonaws.com');
regionalEndpoint = config.endpoint.substring(0, insertPoint) +
var regionalEndpoint = config.endpoint.substring(0, insertPoint) +
'.us-east-1' + config.endpoint.substring(insertPoint);
req.httpRequest.updateEndpoint(regionalEndpoint);
}
Expand Down

0 comments on commit fdb4079

Please sign in to comment.