mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 06:31:58 +00:00
fix(web): prevent infinite loop when modifying stacked asset (#14162)
This commit is contained in:
parent
d1169e3b2f
commit
a60209db3e
1 changed files with 6 additions and 4 deletions
|
@ -32,7 +32,7 @@
|
|||
type AssetResponseDto,
|
||||
type StackResponseDto,
|
||||
} from '@immich/sdk';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { onDestroy, onMount, untrack } from 'svelte';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { fly } from 'svelte/transition';
|
||||
import Thumbnail from '../assets/thumbnail/thumbnail.svelte';
|
||||
|
@ -120,9 +120,11 @@
|
|||
stack = null;
|
||||
}
|
||||
|
||||
if (stack && stack?.assets.length > 1) {
|
||||
preloadAssets.push(stack.assets[1]);
|
||||
}
|
||||
untrack(() => {
|
||||
if (stack && stack?.assets.length > 1) {
|
||||
preloadAssets.push(stack.assets[1]);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const handleAddComment = () => {
|
||||
|
|
Loading…
Reference in a new issue