Skip to content

Commit

Permalink
fix: consider openByDefault prop when rehydrating drawer state (#9099)
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Huber <jh@sekonia.com>
Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
  • Loading branch information
3 people committed Dec 17, 2020
1 parent c9a5d45 commit 2ad61a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/routers/src/DrawerRouter.tsx
Expand Up @@ -145,7 +145,7 @@ export default function DrawerRouter({
routeParamList,
});

if (isDrawerOpen(partialState)) {
if (partialState.history ? isDrawerOpen(partialState) : openByDefault) {
state = openDrawer(state);
}

Expand Down

0 comments on commit 2ad61a6

Please sign in to comment.