Skip to content

Commit

Permalink
fix(sanity): avoid complex TS features to make `@microsoft/api-extrac…
Browse files Browse the repository at this point in the history
…tor` build
  • Loading branch information
mariuslundgard committed Oct 4, 2022
1 parent c3883a5 commit d751a05
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export class TimelineController {
private async fetchMoreTransactions() {
const publishedId = this.timeline.publishedId
const draftId = this.timeline.draftId
const {dataset, token} = this.client.config()
const clientConfig = this.client.config()
const limit = TRANSLOG_ENTRY_LIMIT

let queryParams = `tag=sanity.studio.desk.history&effectFormat=mendoza&excludeContent=true&excludeMutations=true&includeIdentifiedDocumentsOnly=true&reverse=true&limit=${limit}`
Expand All @@ -271,9 +271,10 @@ export class TimelineController {
queryParams += `&toTransaction=${tid}`
}

const url = `/data/history/${dataset}/transactions/${publishedId},${draftId}?${queryParams}`

const stream = await getJsonStream(this.client.getUrl(url), token)
const transactionsUrl = this.client.getUrl(
`/data/history/${clientConfig.dataset}/transactions/${publishedId},${draftId}?${queryParams}`
)
const stream = await getJsonStream(transactionsUrl, clientConfig.token)
const reader = stream.getReader()
let count = 0

Expand Down

0 comments on commit d751a05

Please sign in to comment.