Skip to content

Commit

Permalink
refactor: remove unneeded extra variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mikerourke committed Jan 17, 2024
1 parent 09e7997 commit e4eb697
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/redux/tasks/sagas/togglTasksSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,16 @@ export function* fetchTogglTasksSaga(): SagaIterator<Task[]> {

const togglProjectsTable = allProjectsTable[ToolName.Toggl];

// prettier-ignore
const tableEntries = Object.entries(togglProjectsTable) as [string, Project[]][];

const allFreeWorkspaceIds = yield select(allFreeWorkspaceIdsSelector);

const allTasks: Task[] = [];

const apiDelay = getApiDelayForTool(ToolName.Toggl);

const allFreeWorkspaceIds = yield select(allFreeWorkspaceIdsSelector);

const freeWorkspaceIds = new Set<string>();

for (const [workspaceId, projects] of tableEntries) {
for (const entry of Object.entries(togglProjectsTable)) {
const [workspaceId, projects] = entry as [string, Project[]];
// Toggl tasks can't be fetched for paid workspaces. Rather than make a
// bunch of requests that return 402, we skip them. We add it to a set
// rather than just continue out of the loop, so we can catch fetch errors
Expand Down

0 comments on commit e4eb697

Please sign in to comment.