Skip to content

Commit

Permalink
Fix linting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
znicholasbrown committed Apr 23, 2021
1 parent 5b4f8b6 commit fc2d2c2
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/workers/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function GenerateRows(items) {
itemLoop: for (let i = 0; i < items.length; ++i) {
const item = items[i]

// If the item hasn't started yet, we distribute
// it to the row with the least items already
// If the item hasn't started yet, we distribute
// it to the row with the least items already
if (!item.start_time) {
const lengths = grid.map(row => row.length)
let row = lengths.indexOf(Math.min(...lengths))
Expand All @@ -20,16 +20,12 @@ export function GenerateRows(items) {
} else {
grid[row].push([start, end])
}

continue itemLoop
}

const start_ = item.start_time
? new Date(item.start_time).getTime()
: null
const end_ = item.end_time
? new Date(item.end_time).getTime()
: Date.now()
const start_ = item.start_time ? new Date(item.start_time).getTime() : null
const end_ = item.end_time ? new Date(item.end_time).getTime() : Date.now()

for (let row = 0; row <= grid.length; ++row) {
// If the current row doesn't exist, create it, put this item on it,
Expand Down Expand Up @@ -68,4 +64,4 @@ export function GenerateRows(items) {
}

return { rowMap, rows: grid.length }
}
}

0 comments on commit fc2d2c2

Please sign in to comment.