mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-10 19:57:43 +02:00
qfix: ensure target mappings are not undefined (#7936)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -608,7 +608,7 @@ export class ProjectsSyncManager implements DocSyncManager {
|
||||
okit: Octokit
|
||||
): Promise<{ projectStructure: GithubProjectV2, wasUpdates: boolean, mappings: GithubFieldMapping[] }> {
|
||||
let projectStructure = await this.queryProjectStructure(integration, target)
|
||||
let mappings = target.mappings
|
||||
let mappings = target.mappings ?? []
|
||||
|
||||
if (projectStructure === undefined) {
|
||||
if (this.client.getHierarchy().isDerived(tracker.class.Project, target._class)) {
|
||||
@@ -651,7 +651,7 @@ export class ProjectsSyncManager implements DocSyncManager {
|
||||
const mHash = JSON.stringify(mappings)
|
||||
// Create any platform field into matching github field
|
||||
for (const [, f] of allFields.entries()) {
|
||||
const existingField = (mappings ?? []).find((it) => it._id === f._id)
|
||||
const existingField = mappings.find((it) => it._id === f._id)
|
||||
if (f.hidden === true) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user