Skip to content

Commit

Permalink
don't overwrite an asserted env val
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed May 7, 2023
1 parent 3d37a00 commit 57224a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sphinx_immaterial/mermaid_diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ def copy_mermaid_dist(app: Sphinx, env: BuildEnvironment):
def _merge_env_key(
app: Sphinx, env: BuildEnvironment, docnames: List[str], other: BuildEnvironment
) -> None:
setattr(env, _COPY_MERMAID_DIST_ENV_KEY, getattr(other, _COPY_MERMAID_DIST_ENV_KEY))
val = getattr(env, _COPY_MERMAID_DIST_ENV_KEY, False)
setattr(
env,
_COPY_MERMAID_DIST_ENV_KEY,
val or getattr(other, _COPY_MERMAID_DIST_ENV_KEY),
)


def setup(app: Sphinx):
Expand Down

0 comments on commit 57224a3

Please sign in to comment.