Skip to content

Commit 0c1f799

Browse files
committed
fix adding a new deal note throws a dataProvider error
1 parent 42a82e1 commit 0c1f799

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/demo/src/notes/NewNote.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ export const NewNote = ({
5555
setText('');
5656
notify('Note added successfully');
5757
refetch();
58-
update(reference, {
59-
id: (record && record.id) as unknown as Identifier,
60-
data: { last_seen: date, status },
61-
previousData: record,
62-
});
58+
if (reference === 'contacts') {
59+
update(reference, {
60+
id: (record && record.id) as unknown as Identifier,
61+
data: { last_seen: date, status },
62+
previousData: record,
63+
});
64+
}
6365
},
6466
}
6567
);

0 commit comments

Comments
 (0)