Skip to content

Commit

Permalink
Fixes console error when metadata is not present in certain pages (#2460
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Hetarth02 authored Feb 26, 2024
1 parent add1f42 commit 69ae9db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

* Added support for a `CollapsedDocStrings` key in every page's `@meta` block. Setting `CollapsedDocStrings = true` for a particular page essentially clicks the "Collapse all docstrings" in the navigation bar after the page loads, collapsing all docstrings on that page. This can make API documentation pages much more readable. ([#2282], [#2394])
* Added support for a `CollapsedDocStrings` key in every page's `@meta` block. Setting `CollapsedDocStrings = true` for a particular page essentially clicks the "Collapse all docstrings" in the navigation bar after the page loads, collapsing all docstrings on that page. This can make API documentation pages much more readable. ([#2282], [#2394], [#2459], [#2460])

### Changed

Expand Down Expand Up @@ -1799,6 +1799,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#2430]: https://github.com/JuliaDocs/Documenter.jl/issues/2430
[#2438]: https://github.com/JuliaDocs/Documenter.jl/issues/2438
[#2458]: https://github.com/JuliaDocs/Documenter.jl/issues/2458
[#2459]: https://github.com/JuliaDocs/Documenter.jl/issues/2459
[#2460]: https://github.com/JuliaDocs/Documenter.jl/issues/2460
[JuliaLang/julia#36953]: https://github.com/JuliaLang/julia/issues/36953
[JuliaLang/julia#38054]: https://github.com/JuliaLang/julia/issues/38054
[JuliaLang/julia#39841]: https://github.com/JuliaLang/julia/issues/39841
Expand Down
2 changes: 1 addition & 1 deletion assets/html/js/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$(document).ready(function () {
let meta = $("div[data-docstringscollapsed]").data();

if (meta.docstringscollapsed) {
if (meta?.docstringscollapsed) {
$("#documenter-article-toggle-button").trigger({
type: "click",
noToggleAnimation: true,
Expand Down

0 comments on commit 69ae9db

Please sign in to comment.