Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

More linting

Matt Robertsbdf9d809a40e
diff --git a/lingui.config.js b/lingui.config.js
index e89c1141a..1b2664169 100644
--- a/lingui.config.js
+++ b/lingui.config.js
@@ -1,6 +1,6 @@
import { formatter } from "@lingui/format-json"
-module.exports = {
+export default {
catalogs: [
{
path: "<rootDir>/locale/{locale}/client",
diff --git a/public/index.tsx b/public/index.tsx
index ea49bbcde..2aa2b0710 100644
--- a/public/index.tsx
+++ b/public/index.tsx
@@ -43,22 +43,24 @@ const bootstrapApp = (i18n: I18n) => {
"is-staff": fider.session.isAuthenticated && fider.session.user.isCollaborator,
})
- const root = createRoot(document.getElementById("root")!)
- root.render(
- <React.StrictMode>
- <ErrorBoundary onError={logProductionError}>
- <I18nProvider i18n={i18n}>
- <FiderContext.Provider value={fider}>
- <DevBanner />
- <ReadOnlyNotice />
- <Suspense fallback={<Loading />}>{React.createElement(component, fider.session.props)}</Suspense>
- </FiderContext.Provider>
- </I18nProvider>
- </ErrorBoundary>
- </React.StrictMode>
- )
+ const rootElement = document.getElementById("root")
+ if (rootElement) {
+ const root = createRoot(rootElement)
+ root.render(
+ <React.StrictMode>
+ <ErrorBoundary onError={logProductionError}>
+ <I18nProvider i18n={i18n}>
+ <FiderContext.Provider value={fider}>
+ <DevBanner />
+ <ReadOnlyNotice />
+ <Suspense fallback={<Loading />}>{React.createElement(component, fider.session.props)}</Suspense>
+ </FiderContext.Provider>
+ </I18nProvider>
+ </ErrorBoundary>
+ </React.StrictMode>
+ )
+ }
}
-
const fider = Fider.initialize()
__webpack_nonce__ = fider.session.contextID
__webpack_public_path__ = `${fider.settings.assetsURL}/assets/`