diff --git a/lib/src/model/package_graph.dart b/lib/src/model/package_graph.dart index cc8d51db20..a4f60d2629 100644 --- a/lib/src/model/package_graph.dart +++ b/lib/src/model/package_graph.dart @@ -105,7 +105,7 @@ class PackageGraph { yield d.precacheLocalDocs(); // TopLevelVariables get their documentation from getters and setters, // so should be precached if either has a template. - if (m is TopLevelVariable) { + if (m is TopLevelVariable && !precachedElements.contains(m)) { precachedElements.add(m); yield m.precacheLocalDocs(); }