Skip to content

Commit

Permalink
make options object optional - fixes #7340
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Oct 21, 2022
1 parent 3edb240 commit 113ce38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-students-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-static': patch
---

Make options object optional
2 changes: 1 addition & 1 deletion packages/adapter-static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function (options) {
};
});

if (dynamic_routes.length > 0 && options.strict) {
if (dynamic_routes.length > 0 && options?.strict !== false) {
const prefix = path.relative('.', builder.config.kit.files.routes);
const has_param_routes = dynamic_routes.some((route) => route.includes('['));
const config_option =
Expand Down

0 comments on commit 113ce38

Please sign in to comment.