diff --git a/CHANGELOG.md b/CHANGELOG.md index b239d5e53..e10c5248a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- Fixed sidebar not correctly reopening (#1196) + ## [0.29.0] - 2025-02-06 ### Added diff --git a/src/components/Menus/Sidebar/SidebarBar.jsx b/src/components/Menus/Sidebar/SidebarBar.jsx index 606740e10..4bcda60b6 100644 --- a/src/components/Menus/Sidebar/SidebarBar.jsx +++ b/src/components/Menus/Sidebar/SidebarBar.jsx @@ -25,7 +25,7 @@ const SidebarBar = (props) => { const isMobile = useMediaQuery({ query: MOBILE_MEDIA_QUERY }); const expandPopOut = () => { - const option = instructions ? "instructions" : "file"; + const option = instructions.length > 0 ? "instructions" : "file"; toggleOption(option); if (window.plausible) { // TODO: Make dynamic events for each option or rename this event diff --git a/src/components/Menus/Sidebar/SidebarBar.test.js b/src/components/Menus/Sidebar/SidebarBar.test.js index 1d0b52051..4ca9553f4 100644 --- a/src/components/Menus/Sidebar/SidebarBar.test.js +++ b/src/components/Menus/Sidebar/SidebarBar.test.js @@ -73,7 +73,13 @@ describe("SidebarBar", () => { , );