Added type check for window to support server rendering.
Added type check for window to support server rendering.

balloob/react-sidebar,lyndeniece/react-sidebar,gregory90/react-sidebar,LKay/react-sidebar,balloob/react-sidebar,gregory90/react-sidebar,ababol/react-sidebar,lyndeniece/react-sidebar,ababol/react-sidebar,LKay/react-sidebar