Fix locale switch on prefetch
This commit is contained in:
@@ -2,10 +2,9 @@ import {loadTranslations} from '$lib/translations';
|
|||||||
import type {LayoutLoad} from "./$types";
|
import type {LayoutLoad} from "./$types";
|
||||||
|
|
||||||
export const load: LayoutLoad = async ({ url, data }) => {
|
export const load: LayoutLoad = async ({ url, data }) => {
|
||||||
const { pathname } = url;
|
|
||||||
const { locale } = data.i18n
|
const { locale } = data.i18n
|
||||||
|
|
||||||
await loadTranslations(locale, pathname);
|
await loadTranslations(locale);
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user