Skip to content

Commit 0bc6fde

Browse files
mraerinonickytonline
authored andcommitted
fix: push rules to array
1 parent b5f86a2 commit 0bc6fde

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

packages/runtime/src/helpers/utils.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,16 @@ export const redirectsForNextRouteWithData = ({
197197

198198
const routes = []
199199
if (i18n?.locales?.length) {
200-
i18n.locales.flatMap((locale) =>
201-
paths.map((redirect) => ({
202-
from: `${basePath}${redirect}`,
203-
to,
204-
status,
205-
force,
206-
conditions: { Language: locale },
207-
})),
200+
routes.push(
201+
...i18n.locales.flatMap((locale) =>
202+
paths.map((redirect) => ({
203+
from: `${basePath}${redirect}`,
204+
to,
205+
status,
206+
force,
207+
conditions: { Language: locale },
208+
})),
209+
),
208210
)
209211
}
210212

0 commit comments

Comments
 (0)