We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaa029d commit d6a9bceCopy full SHA for d6a9bce
packages/examples/src/langium/statemachine/main-react.tsx
@@ -56,7 +56,8 @@ export const runStatemachineReact = async (noControls: boolean) => {
56
};
57
58
const renderApp = () => {
59
- const strictMode = (document.getElementById('checkbox-strictmode') as HTMLInputElement)?.checked ?? false;
+ const elem = document.getElementById('checkbox-strictmode');
60
+ const strictMode = elem === null ? false : (elem as HTMLInputElement).checked;
61
if (strictMode) {
62
root.render(<StrictMode><App /></StrictMode>);
63
} else {
0 commit comments