File tree 1 file changed +7
-7
lines changed
packages/middleware-location-constraint/src
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -26,23 +26,23 @@ export function locationConstraintMiddleware(
26
26
const { CreateBucketConfiguration } = args . input ;
27
27
//After region config resolution, region is a Provider<string>
28
28
const region = await options . region ( ) ;
29
- if (
30
- ! CreateBucketConfiguration ||
31
- ! CreateBucketConfiguration . LocationConstraint
32
- ) {
29
+ if ( region === "us-east-1" ) {
33
30
args = {
34
31
...args ,
35
32
input : {
36
33
...args . input ,
37
- CreateBucketConfiguration : { LocationConstraint : region }
34
+ CreateBucketConfiguration : undefined
38
35
}
39
36
} ;
40
- } else if ( region === "us-east-1" ) {
37
+ } else if (
38
+ ! CreateBucketConfiguration ||
39
+ ! CreateBucketConfiguration . LocationConstraint
40
+ ) {
41
41
args = {
42
42
...args ,
43
43
input : {
44
44
...args . input ,
45
- CreateBucketConfiguration : undefined
45
+ CreateBucketConfiguration : { LocationConstraint : region }
46
46
}
47
47
} ;
48
48
}
You can’t perform that action at this time.
0 commit comments