mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: only load rtl plugin once (#12365)
fix(web): only load rtl plugin once
This commit is contained in:
parent
77904a54d8
commit
d6729c50c9
2 changed files with 8 additions and 10 deletions
|
|
@ -3,17 +3,13 @@ import { initLanguage } from '$lib/utils';
|
|||
import { defaults } from '@immich/sdk';
|
||||
import { memoize } from 'lodash-es';
|
||||
|
||||
type fetchType = typeof fetch;
|
||||
type Fetch = typeof fetch;
|
||||
|
||||
export function initSDK(fetch: fetchType) {
|
||||
async function _init(fetch: Fetch) {
|
||||
// set event.fetch on the fetch-client used by @immich/sdk
|
||||
// https://kit.svelte.dev/docs/load#making-fetch-requests
|
||||
// https://github.com/oazapfts/oazapfts/blob/main/README.md#fetch-options
|
||||
defaults.fetch = fetch;
|
||||
}
|
||||
|
||||
async function _init(fetch: fetchType) {
|
||||
initSDK(fetch);
|
||||
await initLanguage();
|
||||
await retrieveServerConfig();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue