Skip to content

Commit c43a998

Browse files
authored
Fix success callback not getting invoked (#1458)
1 parent af88076 commit c43a998

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/dsync/ToggleConnectionStatus/index.lite.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ export default function ToggleConnectionStatus(props: ToggleDirectoryStatusProps
4848
if (response && typeof response === 'object') {
4949
if ('error' in response && response.error) {
5050
typeof props.errorCallback === 'function' && props.errorCallback(response.error.message);
51-
} else if ('data' in response && response.data) {
52-
typeof props.successCallback === 'function' &&
53-
props.successCallback({ operation: 'UPDATE', connection: response.data });
51+
} else {
52+
typeof props.successCallback === 'function' && props.successCallback({ operation: 'UPDATE' });
5453
}
5554
}
5655
}

0 commit comments

Comments
 (0)