fix bug in pagination, clean up the approach a bit more

This commit is contained in:
Andrej Karpathy
2021-12-18 23:25:45 -08:00
parent c3cb157c9f
commit 759f7e73e6
4 changed files with 19 additions and 44 deletions
+4 -2
View File
@@ -26,5 +26,7 @@ const WordList = props => {
)
}
ReactDOM.render(<WordList words={words} words_desc={words_desc} />,
document.getElementById('wordwrap'));
var elt = document.getElementById('wordwrap');
if(elt) {
ReactDOM.render(<WordList words={words} words_desc={words_desc} />, elt);
}