Skip to content

Commit fe98a21

Browse files
authored
fix: use optional chaining when checking router type (#13218)
* fix: use optional chaining when checking router type * no need for changeset, nothing was released yet * Revert "no need for changeset, nothing was released yet" This reverts commit cff720b.
1 parent f103084 commit fe98a21

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/strange-wolves-draw.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/adapter-static': patch
3+
---
4+
5+
fix: use optional chaining when checking router type

packages/adapter-static/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function (options) {
77
name: '@sveltejs/adapter-static',
88

99
async adapt(builder) {
10-
if (!options?.fallback && builder.config.kit.router.type !== 'hash') {
10+
if (!options?.fallback && builder.config.kit.router?.type !== 'hash') {
1111
const dynamic_routes = builder.routes.filter((route) => route.prerender !== true);
1212
if (dynamic_routes.length > 0 && options?.strict !== false) {
1313
const prefix = path.relative('.', builder.config.kit.files.routes);

0 commit comments

Comments
 (0)