From: Daniel Kutyła Date: Mon, 3 Oct 2022 08:26:13 +0000 (+0200) Subject: 18692: Aditional while loop variable added X-Git-Tag: 2.5.0~33^2~7 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/6ec656e63158b084e0c62abf0761b6ee84118fac 18692: Aditional while loop variable added Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła --- diff --git a/src/common/frozen-resources.ts b/src/common/frozen-resources.ts index 10e18151..7670720a 100644 --- a/src/common/frozen-resources.ts +++ b/src/common/frozen-resources.ts @@ -9,7 +9,7 @@ export const resourceIsFrozen = (resource: any, resources): boolean => { let isFrozen: boolean = !!resource.frozenByUuid; let ownerUuid: string | undefined = resource?.ownerUuid; - while(!isFrozen && !!ownerUuid) { + while(!isFrozen && !!ownerUuid && resource.uuid !== ownerUuid) { const parentResource: ProjectResource | undefined = getResource(ownerUuid)(resources); isFrozen = !!parentResource?.frozenByUuid; ownerUuid = parentResource?.ownerUuid;