From 49a4f32456b0a6c28fcc0b428056e1414cf317d2 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 21 Oct 2022 11:35:09 -0400 Subject: [PATCH] [fix] make options object optional (#7341) fixes #7340 --- .changeset/chilled-students-unite.md | 5 +++++ packages/adapter-static/index.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilled-students-unite.md diff --git a/.changeset/chilled-students-unite.md b/.changeset/chilled-students-unite.md new file mode 100644 index 000000000000..f5e3f6488826 --- /dev/null +++ b/.changeset/chilled-students-unite.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/adapter-static': patch +--- + +Make options object optional diff --git a/packages/adapter-static/index.js b/packages/adapter-static/index.js index 37c3f8538cc6..8e9bf8b84ea2 100644 --- a/packages/adapter-static/index.js +++ b/packages/adapter-static/index.js @@ -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 =