sandpack
sandpack copied to clipboard
Nullish coalescing breaks Sandpack
Bug report
Packages affected
- [x] sandpack-client
- [ ] sandpack-react
Description of the problem
Using the nullish coalescing feature breaks the preview.
Example from the official website:
What were you doing when the problem occurred?
What steps can we take to reproduce the problem?
Navigate to https://sandpack.codesandbox.io/docs/getting-started/usage#templates.
Choose the vanilla
template and write this code
import "./styles.css";
let text;
document.getElementById("app").innerHTML = text ?? "smth";
See how an error appears (visible in the picture as well)