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 9f8d3d0 commit d2ff26bCopy full SHA for d2ff26b
src/librustdoc/html/static/js/settings.js
@@ -289,10 +289,16 @@
289
el.innerHTML = innerHTML;
290
291
if (isSettingsPage) {
292
- document.getElementById(MAIN_ID).appendChild(el);
+ const mainElem = document.getElementById(MAIN_ID);
293
+ if (mainElem !== null) {
294
+ mainElem.appendChild(el);
295
+ }
296
} else {
297
el.setAttribute("tabindex", "-1");
- getSettingsButton().appendChild(el);
298
+ const settingsBtn = getSettingsButton();
299
+ if (settingsBtn !== null) {
300
+ settingsBtn.appendChild(el);
301
302
}
303
return el;
304
0 commit comments