From 8ab112902ddc8e78ef5d59649196bec12c02b069 Mon Sep 17 00:00:00 2001 From: mathieunicolas <65437872+mathieunicolas@users.noreply.github.com> Date: Thu, 23 Mar 2023 12:52:51 +0100 Subject: [PATCH] Fine tuning collapsed state The line before the PR was not working when `aside.collapsed` was set to `false`, because the `if` statement was evaluated to `false`. I don't know if it's clean, but it works. --- components/docs/DocsAsideTree.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/docs/DocsAsideTree.vue b/components/docs/DocsAsideTree.vue index 623ca3a84..a713ede23 100644 --- a/components/docs/DocsAsideTree.vue +++ b/components/docs/DocsAsideTree.vue @@ -47,7 +47,7 @@ const isCollapsed = (link: any) => { } // Check if aside.collapsed has been set in YML - if (link?.aside?.collapsed) { return link.aside.collapsed } + if ([true, false].includes(link?.aside?.collapsed)) { return link.aside.collapsed } // Return value grabbed from the link if (link?.collapsed) { return link?.collapsed }