diff --git a/src/excalidraw-app/data/firebase.ts b/src/excalidraw-app/data/firebase.ts index dd7e207e..bf4dbb7f 100644 --- a/src/excalidraw-app/data/firebase.ts +++ b/src/excalidraw-app/data/firebase.ts @@ -11,7 +11,15 @@ import { MIME_TYPES } from "../../constants"; // private // ----------------------------------------------------------------------------- -const FIREBASE_CONFIG = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG); +let FIREBASE_CONFIG: Record; +try { + FIREBASE_CONFIG = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG); +} catch (error: any) { + console.warn( + `Error JSON parsing firebase config. Supplied value: ${process.env.REACT_APP_FIREBASE_CONFIG}`, + ); + FIREBASE_CONFIG = {}; +} let firebasePromise: Promise | null = null;