diff --git a/main.js b/main.js index 0d43d92..e0c5e15 100644 --- a/main.js +++ b/main.js @@ -20811,6 +20811,8 @@ var App = function App() { ;// CONCATENATED MODULE: ./src/index.tsx +// TODO: How can we make the components using this package not care about this file, but keep it here for when we run GeoChart standalone? We don't want to create a chart in a root node when we import this chart package. + // Fetch the cgpv module var w = window; @@ -20818,10 +20820,13 @@ var cgpv = w['cgpv']; var react = cgpv.react, createRoot = cgpv.createRoot; console.log("geochart index.tsx run"); -var container = createRoot(document.getElementById("root")); -container.render( /*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode, { - children: /*#__PURE__*/(0,jsx_runtime.jsx)(src_App, {}) -})); +var root = document.getElementById("root"); +if (root) { + var container = createRoot(document.getElementById("root")); + container.render( /*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode, { + children: /*#__PURE__*/(0,jsx_runtime.jsx)(src_App, {}) + })); +} })(); /******/ })()