Skip to content

Commit

Permalink
Fix success callback not getting invoked (#1458)
Browse files Browse the repository at this point in the history
  • Loading branch information
niwsa authored Jul 17, 2024
1 parent af88076 commit c43a998
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dsync/ToggleConnectionStatus/index.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ export default function ToggleConnectionStatus(props: ToggleDirectoryStatusProps
if (response && typeof response === 'object') {
if ('error' in response && response.error) {
typeof props.errorCallback === 'function' && props.errorCallback(response.error.message);
} else if ('data' in response && response.data) {
typeof props.successCallback === 'function' &&
props.successCallback({ operation: 'UPDATE', connection: response.data });
} else {
typeof props.successCallback === 'function' && props.successCallback({ operation: 'UPDATE' });
}
}
}
Expand Down

0 comments on commit c43a998

Please sign in to comment.