Skip to content

Commit 858632e

Browse files
authored
Fix error on removing default task states (#9281)
Signed-off-by: Caranell <[email protected]>
1 parent 2d009aa commit 858632e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/contact-resources/src/components/DeleteConfirmationPopup.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
const me = getCurrentEmployee()
3434
const objectArray = Array.isArray(object) ? object : [object]
3535
const dispatch = createEventDispatcher()
36-
let creators: Ref<Person>[]
36+
let creators: Ref<Person>[] | undefined
3737
$: getPersonRefsByPersonIdsCb(uniqueNotEmpty(objectArray.map((obj) => obj.createdBy)), (refs) => {
3838
creators = Array.from(refs.values())
3939
})
4040
4141
$: canDelete =
4242
(skipCheck ||
43-
(creators.length === 1 && creators[0] === me) ||
43+
(creators !== undefined && creators.length === 1 && creators[0] === me) ||
4444
getCurrentAccount().role === AccountRole.Owner ||
4545
isAdminUser()) &&
4646
canDeleteExtra
@@ -75,7 +75,7 @@
7575
</div>
7676
<div class="mb-2">
7777
<Label label={view.string.DeletePopupCreatorLabel} />
78-
{#each creators as person}
78+
{#each creators ?? [] as person}
7979
<div class="my-2">
8080
<PersonRefPresenter value={person} />
8181
</div>

0 commit comments

Comments
 (0)