File tree 2 files changed +5
-5
lines changed
services/github/pod-github/src/sync
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ export abstract class IssueSyncManagerBase {
214
214
const target : IssueSyncTarget | undefined =
215
215
milestone !== undefined
216
216
? {
217
- mappings : milestone . mappings ,
217
+ mappings : milestone . mappings ?? [ ] ,
218
218
project : prj ,
219
219
target : milestone
220
220
}
@@ -1161,7 +1161,7 @@ export abstract class IssueSyncManagerBase {
1161
1161
}
1162
1162
return {
1163
1163
project,
1164
- mappings : milestone . mappings ,
1164
+ mappings : milestone . mappings ?? [ ] ,
1165
1165
target : milestone ,
1166
1166
prjData : external . projectItems . nodes . find ( ( it ) => it . project . id === milestone . projectNodeId )
1167
1167
}
@@ -1172,7 +1172,7 @@ export abstract class IssueSyncManagerBase {
1172
1172
getProjectIssueTarget ( project : GithubProject , external ?: IssueExternalData ) : IssueSyncTarget {
1173
1173
return {
1174
1174
project,
1175
- mappings : project . mappings ,
1175
+ mappings : project . mappings ?? [ ] ,
1176
1176
target : project ,
1177
1177
prjData : external ?. projectItems . nodes . find ( ( it ) => it . project . id === project . projectNodeId )
1178
1178
}
Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ export class ProjectsSyncManager implements DocSyncManager {
608
608
okit : Octokit
609
609
) : Promise < { projectStructure : GithubProjectV2 , wasUpdates : boolean , mappings : GithubFieldMapping [ ] } > {
610
610
let projectStructure = await this . queryProjectStructure ( integration , target )
611
- let mappings = target . mappings
611
+ let mappings = target . mappings ?? [ ]
612
612
613
613
if ( projectStructure === undefined ) {
614
614
if ( this . client . getHierarchy ( ) . isDerived ( tracker . class . Project , target . _class ) ) {
@@ -651,7 +651,7 @@ export class ProjectsSyncManager implements DocSyncManager {
651
651
const mHash = JSON . stringify ( mappings )
652
652
// Create any platform field into matching github field
653
653
for ( const [ , f ] of allFields . entries ( ) ) {
654
- const existingField = ( mappings ?? [ ] ) . find ( ( it ) => it . _id === f . _id )
654
+ const existingField = mappings . find ( ( it ) => it . _id === f . _id )
655
655
if ( f . hidden === true ) {
656
656
continue
657
657
}
You can’t perform that action at this time.
0 commit comments