Skip to content

Commit

Permalink
chore: Minor typescript fix for promiseTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
nellh committed Apr 2, 2024
1 parent c8471c2 commit 766ed0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/openneuro-server/src/utils/promiseTimeout.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PromiseTimeoutError } from "../types/promiseTimeoutError.ts"
import { PromiseTimeoutError } from "../types/promiseTimeoutError"

/**
* Add a timeout to a promise and return null if timeout occurs before the promise resolves
Expand All @@ -19,7 +19,7 @@ export async function promiseTimeout<T>(
)
),
])

// @ts-expect-error This does return the original promise except in failure cases where it returns the expected null
return result
} catch (error) {
if (error instanceof PromiseTimeoutError) {
Expand Down

0 comments on commit 766ed0f

Please sign in to comment.