Skip to content

Commit bf3f7c9

Browse files
author
Dane Pilcher
committed
docs: move comment to filter statement
1 parent 0a3b2d1 commit bf3f7c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/appsync-modelgen-plugin/src/visitors/appsync-visitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,9 +1184,9 @@ export class AppSyncModelVisitor<
11841184
connectionInfo.targetName !== 'id'
11851185
) {
11861186
// Need to remove the field that is targetName
1187-
// Don't remove the field if it is part of the primary key field on the parent model
11881187
const primaryKeyFieldNames = getModelPrimaryKeyComponentFields(model).map(field => field.name);
11891188
connectionInfo.targetNames
1189+
// Don't remove the field if it is part of the primary key field on the parent model
11901190
.filter(targetName => !primaryKeyFieldNames.includes(targetName))
11911191
.forEach(targetName => removeFieldFromModel(model, targetName));
11921192
}

0 commit comments

Comments
 (0)