Skip to content

Commit edb1fd5

Browse files
committed
fix: fix type issue
1 parent 04ae085 commit edb1fd5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/constructs/aws/ServerSideWebsite.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class ServerSideWebsite extends AwsConstruct {
129129
: undefined;
130130

131131
// Hide the stage in the URL in REST scenario
132-
const originPath = configuration.apiGateway === "rest" ? "/" + provider.getStage() : undefined;
132+
const originPath = configuration.apiGateway === "rest" ? "/" + (provider.getStage() ?? "") : undefined;
133133

134134
this.distribution = new Distribution(this, "CDN", {
135135
comment: `${provider.stackName} ${id} website CDN`,

src/providers/AwsProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class AwsProvider implements ProviderInterface {
146146
*
147147
* @internal
148148
*/
149-
getStage(): string {
149+
getStage(): string | undefined {
150150
return this.serverless.service.provider.stage;
151151
}
152152

0 commit comments

Comments
 (0)