ui: only render problem selection element when exists

This commit is contained in:
undefined committed 2025-07-01 13:42:37 +08:00
1 parent 20686ca263
commit 8fe7140c46
1 file changed
+4 -1
@@ -454,11 +454,14 @@ const page = new NamedPage(['problem_main'], () => {
$(document).on('vjContentNew', (e) => processElement(e.target));
processElement(document);
ReactDOM.createRoot(document.getElementById('problem_selection'))
const selection = document.getElementById('problem_selection');
if (selection) {
ReactDOM.createRoot(selection)
.render(<ProblemSelectionDisplay
onChange={(pids) => { selectedPids = pids; }}
onClear={(handler) => { clearSelectionHandler = handler; }}
/>);
}
addSpeculationRules({
prerender: [{