Skip to content

Commit 5aaef62

Browse files
authored
chore: address PR comments (#2463)
1 parent 2083244 commit 5aaef62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/sdk/src/model-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export function getOwnedFields(model: DataModel | TypeDef): DataField[] {
9393
export function getDelegateOriginModel(field: DataField, contextModel: DataModel): string | undefined {
9494
let base = contextModel.baseModel?.ref;
9595
while (base) {
96-
if (isDelegateModel(base) && getOwnedFields(base).includes(field)) {
96+
if (isDelegateModel(base) && getOwnedFields(base).some((f) => f.name === field.name)) {
9797
return base.name;
9898
}
9999
base = base.baseModel?.ref;

0 commit comments

Comments
 (0)