Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieusieben committed Oct 21, 2024
1 parent fdc9b3f commit 68765bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/pds/src/api/app/bsky/feed/getPostThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function (server: Server, ctx: AppContext) {
const { auth, params } = reqCtx
const requester = auth.credentials.did

const rev = err.headers && getRepoRev(err.headers)
const rev = getRepoRev(err.headers)
if (!rev) throw err

const uri = new AtUri(params.uri)
Expand Down
4 changes: 2 additions & 2 deletions packages/pds/src/read-after-write/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import { getRecordsSinceRev } from './viewer'

const REPO_REV_HEADER = 'atproto-repo-rev'

export const getRepoRev = (headers: HeadersMap): string | undefined => {
return headers[REPO_REV_HEADER]
export const getRepoRev = (headers?: HeadersMap): string | undefined => {
return headers?.[REPO_REV_HEADER]
}

export const getLocalLag = (local: LocalRecords): number | undefined => {
Expand Down

0 comments on commit 68765bf

Please sign in to comment.