]> git.lizzy.rs Git - rust.git/commitdiff
Fix JS error
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 24 Sep 2018 20:04:23 +0000 (22:04 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 24 Sep 2018 20:05:12 +0000 (22:05 +0200)
src/librustdoc/html/static/main.js

index 3dbefabace18f978f6c52902ed00ef2a5f05149d..0b56692bc2e75731547b15a1645c7a36625bbd98 100644 (file)
                 }
         };
         if (getCurrentValue('rustdoc-trait-implementations') !== "false") {
-            onEach(document.getElementById('implementations-list')
-                           .getElementsByClassName("collapse-toggle"), collapser);
+            var impl_list = document.getElementById('implementations-list');
+
+            if (impl_list !== null) {
+                onEach(impl_list.getElementsByClassName("collapse-toggle"), collapser);
+            }
         }
         if (getCurrentValue('rustdoc-method-docs') !== "false") {
             var implItems = document.getElementsByClassName('impl-items');