Skip to content

Commit

Permalink
fix check that broke domain filter support after refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchudy committed Jul 16, 2024
1 parent a6ae717 commit e403567
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/providers/recordedit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ export default function RecordeditProvider({
if (!column.isForeignKey) return;

// if it's a prefilled foreignkey, the value is going to be set by processPrefilledForeignKeys
if (prefillObject?.fkColumnNames.indexOf(column.name) !== -1) {
if (prefillObject && prefillObject.fkColumnNames.indexOf(column.name) !== -1) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/recordedit-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export function populateCreateInitialValues(
}

// if it's a prefilled foreignkey, the value is going to be set by processPrefilledForeignKeys
if (column.isForeignKey && prefillObject?.fkColumnNames.indexOf(column.name) !== -1) {
if (column.isForeignKey && prefillObject && prefillObject.fkColumnNames.indexOf(column.name) !== -1) {
continue;
}

Expand Down

0 comments on commit e403567

Please sign in to comment.