Commit b159a2c8 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'mw-gl-breakpoints-7' into 'master'

Replace breakpoints with GlBreakpointInstance in sidebar_context.js

See merge request gitlab-org/gitlab!22012
parents f4e621e7 a70f7129
import $ from 'jquery';
import Cookies from 'js-cookie';
import bp from '~/breakpoints';
import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils';
export default class SidebarContext {
constructor() {
......@@ -32,7 +32,7 @@ export default class SidebarContext {
window.addEventListener('beforeunload', () => {
// collapsed_gutter cookie hides the sidebar
const bpBreakpoint = bp.getBreakpointSize();
if (bpBreakpoint === 'xs' || bpBreakpoint === 'sm') {
if (bpBreakpoint === 'xs' || bpBreakpoint === 'sm' || bpBreakpoint === 'md') {
Cookies.set('collapsed_gutter', true);
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment