I’m using Deno Fresh. In routes/indes.jsx
I have:
import Test from "../islands/test.jsx";
export default function App() {
return <Test></Test>
And in islands/test.jsx
I have:
export default function Test() {
if (undefined) {
return <span>yo</span>
}
return <span>hi</span>
}
It renders fine. However, if in line 2 it’s if (document)
, then the error document is not defined
shows up. Why is that?