Skip to content

Commit

Permalink
refactor(sanity): workaround to fix TS error
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard committed Oct 4, 2022
1 parent d43a03b commit 5d0b591
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,15 @@ export class Timeline {
return this.reachedEarliestEntry ? 'invalid' : 'loading'
}

const [timestampStr, chunkId] = id.split('/', 3)
// NOTE:
// This was refactored from
// ```
// const [timestampStr, chunkId] = id.split('/', 3)
// ```
// in order to avoid issues with `@microsoft/api-extractor`.
const idSegments = id.split('/', 3)
const timestampStr = idSegments.shift()
const chunkId = idSegments.shift()
const timestamp = Number(timestampStr)

for (let idx = this._chunks.lastIdx; idx >= this._chunks.firstIdx; idx--) {
Expand Down

0 comments on commit 5d0b591

Please sign in to comment.