Skip to content

Commit

Permalink
fix: change from property to fields
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv committed Dec 12, 2024
1 parent 7b31208 commit 0411747
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ type CreatedChange = {|
type: typeof CHANGE_TYPES.CREATED,
dataElement?: string,
attribute?: string,
property?: string,
field?: string,
currentValue: any,
|}

type UpdatedChange = {|
type: typeof CHANGE_TYPES.UPDATED,
dataElement?: string,
attribute?: string,
property?: string,
field?: string,
previousValue: any,
currentValue: any,
|}
Expand All @@ -23,7 +23,7 @@ type DeletedChange = {|
type: typeof CHANGE_TYPES.DELETED,
dataElement?: string,
attribute?: string,
property?: string,
field?: string,
previousValue: any,
|}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const fetchFormattedValues = async ({
elementKey: string,
change: Change,
) => {
const { dataElement, attribute, property } = change;
const fieldId = dataElement ?? attribute ?? property;
const { dataElement, attribute, field } = change;
const fieldId = dataElement ?? attribute ?? field;
if (!fieldId) {
log.error('Could not find fieldId in change:', change);
return { metadataElement: null, fieldId: null };
Expand Down

0 comments on commit 0411747

Please sign in to comment.