diff --git a/app/gui/src/dashboard/hooks/backendHooks.ts b/app/gui/src/dashboard/hooks/backendHooks.ts index 52bbd6bd5f6c..f6223944b2b4 100644 --- a/app/gui/src/dashboard/hooks/backendHooks.ts +++ b/app/gui/src/dashboard/hooks/backendHooks.ts @@ -290,8 +290,8 @@ function createUserGroupsWithUsers( users: readonly backendModule.User[], ): readonly UserGroupInfoWithUsers[] { return userGroups.map((userGroup) => { - const usersInGroup: readonly User[] = users.filter((user) => - user.userGroups?.includes(userGroup.id), + const usersInGroup: readonly User[] = users.filter( + (user) => user.userGroups?.includes(userGroup.id) ?? false, ) return { ...userGroup, users: usersInGroup } }) @@ -476,6 +476,7 @@ export function useAsset(options: UseAssetOptions) { parentsPath: '', virtualParentsPath: '', } + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check switch (true) { case assetId === USERS_DIRECTORY_ID: { return { diff --git a/app/gui/src/dashboard/hooks/backendUploadFilesHooks.tsx b/app/gui/src/dashboard/hooks/backendUploadFilesHooks.tsx index 7b82748f3caa..3492ffdb5713 100644 --- a/app/gui/src/dashboard/hooks/backendUploadFilesHooks.tsx +++ b/app/gui/src/dashboard/hooks/backendUploadFilesHooks.tsx @@ -124,6 +124,7 @@ export function useUploadFiles(backend: Backend, category: Category) { if (file != null) { const fileId = method === 'new' ? null : asset.id + // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check switch (true) { case assetIsProject(asset): { const { extension } = extractProjectExtension(file.name) diff --git a/app/gui/src/dashboard/services/RemoteBackend.ts b/app/gui/src/dashboard/services/RemoteBackend.ts index 7f08d5327a05..f381a0bf32c1 100644 --- a/app/gui/src/dashboard/services/RemoteBackend.ts +++ b/app/gui/src/dashboard/services/RemoteBackend.ts @@ -1361,6 +1361,11 @@ export default class RemoteBackend extends Backend { ) break } + case backend.AssetType.secret: + case backend.AssetType.directory: + case backend.AssetType.specialLoading: + case backend.AssetType.specialEmpty: + case backend.AssetType.specialError: default: { invariant(`'${asset.type}' assets cannot be downloaded.`) break