This commit is contained in:
Martin McKeaveney 2020-07-13 17:15:22 +01:00
parent 380781de8b
commit ab13ecad1f
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { getStore } from "./store" import { getStore } from "./store"
import { getBackendUiStore } from "./store/backend" import { getBackendUiStore } from "./store/backend"
import { getWorkflowStore } from "./store/workflow/" import { getWorkflowStore } from "./store/workflow/"
import posthog from "posthog-js"; import posthog from "posthog-js"
export const store = getStore() export const store = getStore()
export const backendUiStore = getBackendUiStore() export const backendUiStore = getBackendUiStore()
@ -10,7 +10,9 @@ export const workflowStore = getWorkflowStore()
export const initialise = async () => { export const initialise = async () => {
try { try {
if (process.env.NODE_ENV === "production") { if (process.env.NODE_ENV === "production") {
posthog.init(process.env.POSTHOG_TOKEN, { api_host: process.env.POSTHOG_URL }); posthog.init(process.env.POSTHOG_TOKEN, {
api_host: process.env.POSTHOG_URL,
})
} }
} catch (err) { } catch (err) {
console.log(err) console.log(err)