Skip to content

Commit

Permalink
Merge pull request #2062 from dubinc/fix-bulk-actions-folders
Browse files Browse the repository at this point in the history
Fix bulk actions for users w/o access to folders
  • Loading branch information
steven-tey authored Feb 20, 2025
2 parents 2bad49c + 243093d commit 639e251
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/web/ui/links/links-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export const LinksToolbar = memo(
);

const hasAllFolderPermissions = useMemo(() => {
// `folders` is undefined for users without access, so just check if all links are not in a folder first
if (selectedLinks.every((link) => !link.folderId)) return true;

if (!folders || !Array.isArray(folders)) return false;

return selectedLinks.every(
Expand Down

0 comments on commit 639e251

Please sign in to comment.