1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(web): prevent infinite loop when modifying stacked asset (#14162)

This commit is contained in:
Michel Heusschen 2024-11-15 13:16:56 +01:00 committed by GitHub
parent d1169e3b2f
commit a60209db3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,7 @@
type AssetResponseDto, type AssetResponseDto,
type StackResponseDto, type StackResponseDto,
} from '@immich/sdk'; } from '@immich/sdk';
import { onDestroy, onMount } from 'svelte'; import { onDestroy, onMount, untrack } from 'svelte';
import { t } from 'svelte-i18n'; import { t } from 'svelte-i18n';
import { fly } from 'svelte/transition'; import { fly } from 'svelte/transition';
import Thumbnail from '../assets/thumbnail/thumbnail.svelte'; import Thumbnail from '../assets/thumbnail/thumbnail.svelte';
@ -120,9 +120,11 @@
stack = null; stack = null;
} }
untrack(() => {
if (stack && stack?.assets.length > 1) { if (stack && stack?.assets.length > 1) {
preloadAssets.push(stack.assets[1]); preloadAssets.push(stack.assets[1]);
} }
});
}; };
const handleAddComment = () => { const handleAddComment = () => {