Skip to content

Commit

Permalink
DO-1661: let parameter presence evaluated first
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Park committed May 23, 2024
1 parent f34290a commit 30512db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/static-hosting/lib/static-hosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ export class StaticHosting extends Construct {

// If the remap is to a different path, create a Lambda@Edge function to handle this
// Remove special characters from path
if (from.replace(/\*$/, "") !== to && to) {
if (to && from.replace(/\*$/, "") !== to) {
const id = from.replace(/[&/\\#,+()$~%'":*?<>{}]/g, "-");

const remapFunction = new PathRemapFunction(
Expand Down

0 comments on commit 30512db

Please sign in to comment.