Skip to content

Commit db5fe1c

Browse files
authored
Fix accidental reentrance on TopLevelVariables in rare case (#2173)
1 parent 578400c commit db5fe1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/model/package_graph.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class PackageGraph {
105105
yield d.precacheLocalDocs();
106106
// TopLevelVariables get their documentation from getters and setters,
107107
// so should be precached if either has a template.
108-
if (m is TopLevelVariable) {
108+
if (m is TopLevelVariable && !precachedElements.contains(m)) {
109109
precachedElements.add(m);
110110
yield m.precacheLocalDocs();
111111
}

0 commit comments

Comments
 (0)