Skip to content

Commit

Permalink
Fixed caching reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ubmarco committed Oct 10, 2023
1 parent 96b6ca9 commit 3e9ff2f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sphinx/environment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,7 @@ def get_doctree(self, docname: str) -> nodes.document:

def get_doctree_write(self, docname: str) -> nodes.document:
"""Split from the function get_and_resolve_doctree for write phase."""
try:
doctree = self._write_doc_doctree_cache.pop(docname)
doctree.settings.env = self
doctree.reporter = LoggingReporter(self.doc2path(docname))
except KeyError:
doctree = self.get_doctree(docname)
doctree = self.get_doctree(docname)
return doctree

def get_and_resolve_doctree(
Expand Down

0 comments on commit 3e9ff2f

Please sign in to comment.