Index: utils/dartdoc/interact.dart |
diff --git a/utils/dartdoc/interact.dart b/utils/dartdoc/interact.dart |
index dabcfd74c81fa2050573c053dc014310f10bb8a5..81c7b226eaed098048c7b7283350095633a667f1 100644 |
--- a/utils/dartdoc/interact.dart |
+++ b/utils/dartdoc/interact.dart |
@@ -11,6 +11,11 @@ main() { |
window.on.contentLoaded.add((e) { |
for (var elem in document.queryAll('.method, .field')) { |
var showCode = elem.query('.show-code'); |
+ |
+ // Skip it if we don't have a code link. Will happen if source code is |
+ // disabled. |
+ if (showCode == null) continue; |
+ |
var pre = elem.query('pre.source'); |
showCode.on.click.add((e) { |
if (pre.classes.contains('expanded')) { |