diff --git a/test/index.html b/test/index.html index 9a99e02..6e6246f 100644 --- a/test/index.html +++ b/test/index.html @@ -6,7 +6,7 @@ react-async-button test page -
+
diff --git a/test/index.tsx b/test/index.tsx index caf8bfe..fabd14f 100644 --- a/test/index.tsx +++ b/test/index.tsx @@ -3,7 +3,13 @@ import { createRoot } from 'react-dom/client'; import Test from './Test.js'; -createRoot(document.getElementById('react-root')!).render( +const root = document.getElementById('root'); + +if (!root) { + throw new Error('Could not find root element'); +} + +createRoot(root).render( ,