fix: bugfix, must call the damn function

This commit is contained in:
Christian Landgren 2021-07-31 00:37:27 +02:00
parent a67ee60f02
commit b6c7f7853b
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ let cachedEvents: TimelineEvent[]
type VoidCallback = () => void
const timeout = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
const runOrTimeout = (fun: VoidCallback, ms: number) => Promise.race([fun, timeout(ms).then(() => Promise.reject(new Error('Timout')))])
const runOrTimeout = (fun: VoidCallback, ms: number) => Promise.race([fun(), timeout(ms).then(() => Promise.reject(new Error('Timout')))])
export const getServerSideProps = async (): Promise<{props: TimelineProps}> => {
// This info has moved to Google Sheets instead