From c2fb88b11aceb9effed2b7d8e85f109495d2edbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dandelion=20Man=C3=A9?= Date: Tue, 8 May 2018 11:50:52 -0700 Subject: [PATCH] Turn on flow for index.js Test plan: `yarn travis` passes --- src/plugins/artifact/editor/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/artifact/editor/index.js b/src/plugins/artifact/editor/index.js index 8614d5b..3ef8d8d 100644 --- a/src/plugins/artifact/editor/index.js +++ b/src/plugins/artifact/editor/index.js @@ -1,9 +1,13 @@ -// @no-flow +// @flow import React from "react"; import ReactDOM from "react-dom"; import "./index.css"; import App from "./App"; import registerServiceWorker from "./registerServiceWorker"; -ReactDOM.render(, document.getElementById("root")); +const root = document.getElementById("root"); +if (root == null) { + throw new Error("Unable to find root element!"); +} +ReactDOM.render(, root); registerServiceWorker();