File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Cookies from 'js-cookie'
33const app = {
44 state : {
55 sidebar : {
6- opened : ! + Cookies . get ( 'sidebarStatus' ) ,
6+ opened : Cookies . get ( 'sidebarStatus' ) ? ! ! + Cookies . get ( 'sidebarStatus' ) : true ,
77 withoutAnimation : false
88 } ,
99 device : 'desktop' ,
@@ -12,16 +12,16 @@ const app = {
1212 } ,
1313 mutations : {
1414 TOGGLE_SIDEBAR : state => {
15+ state . sidebar . opened = ! state . sidebar . opened
16+ state . sidebar . withoutAnimation = false
1517 if ( state . sidebar . opened ) {
1618 Cookies . set ( 'sidebarStatus' , 1 )
1719 } else {
1820 Cookies . set ( 'sidebarStatus' , 0 )
1921 }
20- state . sidebar . opened = ! state . sidebar . opened
21- state . sidebar . withoutAnimation = false
2222 } ,
2323 CLOSE_SIDEBAR : ( state , withoutAnimation ) => {
24- Cookies . set ( 'sidebarStatus' , 1 )
24+ Cookies . set ( 'sidebarStatus' , 0 )
2525 state . sidebar . opened = false
2626 state . sidebar . withoutAnimation = withoutAnimation
2727 } ,
You can’t perform that action at this time.
0 commit comments