mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
fix: configure luxon
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
78fde4ff55
commit
c0d4d233da
2 changed files with 19 additions and 0 deletions
|
@ -13,10 +13,13 @@ import { BaseHead } from '../components/layout/base-head'
|
|||
import { UiNotificationBoundary } from '../components/notifications/ui-notification-boundary'
|
||||
import { StoreProvider } from '../redux/store-provider'
|
||||
import { BaseUrlFromEnvExtractor } from '../utils/base-url-from-env-extractor'
|
||||
import { configureLuxon } from '../utils/configure-luxon'
|
||||
import { ExpectedOriginBoundary } from '../utils/uri-origin-boundary'
|
||||
import type { AppInitialProps, AppProps } from 'next/app'
|
||||
import React from 'react'
|
||||
|
||||
configureLuxon()
|
||||
|
||||
interface AppPageProps {
|
||||
baseUrls: BaseUrls | undefined
|
||||
}
|
||||
|
|
16
frontend/src/utils/configure-luxon.ts
Normal file
16
frontend/src/utils/configure-luxon.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { Settings } from 'luxon'
|
||||
|
||||
export const configureLuxon = () => {
|
||||
Settings.throwOnInvalid = true
|
||||
}
|
||||
|
||||
declare module 'luxon' {
|
||||
interface TSSettings {
|
||||
throwOnInvalid: true
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue