Skip to content

Commit

Permalink
Use updateRole only when roleDiffProps exist
Browse files Browse the repository at this point in the history
  • Loading branch information
avatus committed Jan 29, 2025
1 parent 4400d8b commit 7ab735d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function RoleEditorAdapter({
}, [originalContent]);

const onRoleUpdate = useCallback(
debounce(roleDiffProps.updateRoleDiff, 500),
debounce(role => roleDiffProps?.updateRoleDiff(role), 500),
[]
);

Expand Down

0 comments on commit 7ab735d

Please sign in to comment.