UBERF-7419: Fix various sentry errors (#5931)

This commit is contained in:
Andrey Sobolev
2024-06-27 20:27:00 +07:00
committed by GitHub
parent 777eb415aa
commit 80d22b556c
25 changed files with 76 additions and 44 deletions
@@ -216,9 +216,12 @@
let currentProject: Project | undefined
let descriptionBox: AttachmentStyledBox | undefined
$: updateIssueStatusId(object, currentProject)
$: updateAssigneeId(object, currentProject)
$: canSave =
descriptionBox != null &&
getTitle(object.title ?? '').length > 0 &&
object.status !== undefined &&
kind !== undefined &&
@@ -343,8 +346,6 @@
const dispatch = createEventDispatcher()
const spaceQuery = createQuery()
let descriptionBox: AttachmentStyledBox
const key: KeyedAttribute = {
key: 'labels',
attr: client.getHierarchy().getAttribute(tracker.class.Issue, 'labels')
@@ -513,7 +514,7 @@
}
await operations.commit()
await descriptionBox.createAttachments(_id)
await descriptionBox?.createAttachments(_id)
const parents: IssueParentInfo[] =
parentIssue != null
@@ -986,7 +987,7 @@
showPreview
removable
on:remove={(result) => {
if (result.detail !== undefined) descriptionBox.removeAttachmentById(result.detail._id)
if (result.detail !== undefined) descriptionBox?.removeAttachmentById(result.detail._id)
}}
/>
{/each}
@@ -1000,7 +1001,7 @@
size={'large'}
kind={'ghost'}
on:click={() => {
descriptionBox.handleAttach()
descriptionBox?.handleAttach()
}}
/>
<DocCreateExtComponent manager={docCreateManager} kind={'footer'} space={currentProject} props={extraProps} />
@@ -100,6 +100,7 @@
<div class="antiNav-subheader">
<input
bind:this={inputFile}
disabled={inputFile == null}
multiple
type="file"
name="file"