Skip to content

Commit

Permalink
Fix accidental reentrance on TopLevelVariables in rare case (#2173)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollins-g committed Apr 9, 2020
1 parent 578400c commit db5fe1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/model/package_graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit db5fe1c

Please sign in to comment.