mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-03 08:57:14 +03:00
UBERF-8324: Fix null in external sync and todos (#6777)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
473e57d328
commit
47d14885e5
@ -700,10 +700,12 @@ export class PullRequestSyncManager extends IssueSyncManagerBase implements DocS
|
||||
const approvedOrChangesRequested = new Map<Ref<Person>, PullRequestReviewState>()
|
||||
const reviewStates = new Map<Ref<Person>, PullRequestReviewState[]>()
|
||||
|
||||
const sortedReviews: (Review & { date: number })[] = external.reviews.nodes.map((it) => ({
|
||||
...it,
|
||||
date: new Date(it.updatedAt ?? it.submittedAt ?? it.createdAt).getTime()
|
||||
}))
|
||||
const sortedReviews: (Review & { date: number })[] = external.reviews.nodes
|
||||
.filter((it) => it != null)
|
||||
.map((it) => ({
|
||||
...it,
|
||||
date: new Date(it.updatedAt ?? it.submittedAt ?? it.createdAt).getTime()
|
||||
}))
|
||||
|
||||
for (const it of external.latestReviews.nodes) {
|
||||
if (sortedReviews.some((qt) => it.id === qt.id)) {
|
||||
|
@ -346,7 +346,7 @@ export async function syncDerivedDocuments<T extends { url: string }> (
|
||||
})
|
||||
|
||||
const processed = new Set<Ref<DocSyncInfo>>()
|
||||
const _docs = docs(ext)
|
||||
const _docs = docs(ext).filter((it) => it != null)
|
||||
for (const r of _docs) {
|
||||
const existing = childDocsOfClass.find((it) => it.url.toLowerCase() === r.url.toLowerCase())
|
||||
if (existing === undefined) {
|
||||
|
Loading…
Reference in New Issue
Block a user