Skip to content

Commit

Permalink
fix: bug submit if the users > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mosoriob committed May 28, 2024
1 parent a80a690 commit 89a0c1f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/tapis-app/Apps/_components/Toolbar/ShareModal/ShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,17 @@ const ShareModel: React.FC<ToolbarModalProps> = ({ toggle }) => {
if (!isPublishedApp) {
runUnshare(operations);
}
const userOperations: Array<ShareUserHookParams> = selectedApps.map(
(app) => ({
id: app.id!,
reqShareUpdate: {
users,
},
})
);
runShare(userOperations);
if (users.length > 0) {
const userOperations: Array<ShareUserHookParams> = selectedApps.map(
(app) => ({
id: app.id!,
reqShareUpdate: {
users,
},
})
);
runShare(userOperations);
}
}, [selectedApps, runSharePublic, runUnshare]);

const removeApps = useCallback(
Expand Down

0 comments on commit 89a0c1f

Please sign in to comment.