Skip to content

Commit

Permalink
🐛 tasks no longer have a priority option
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Jan 22, 2024
1 parent b47a61b commit 20e66f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tasks/createTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { startTracking } from '../tracking'

/**
* Adds a task to the queue and returns the new task.
* @param priority {SchedulingStrategy} The priority of the new task.
* @param strategy {SchedulingStrategy} The priority of the new task.
*/
export default function createTask(priority: SchedulingStrategy): ScheduledTask {
const item = { ...withResolvers(), priority }
export default function createTask(strategy: SchedulingStrategy): ScheduledTask {
const item = { ...withResolvers(), strategy }
const insertIndex =
priority === 'interactive'
strategy === 'interactive'
? 0
: priority === 'smooth'
: strategy === 'smooth'
? schedulingState.tasks.findIndex(
(task) => task.strategy === 'smooth' || task.strategy === 'idle',
)
Expand Down

0 comments on commit 20e66f7

Please sign in to comment.