Commit fe0aa823 authored by Alfredo Sumaran's avatar Alfredo Sumaran Committed by Jacob Schatz

Check existence of variable method

This happens because tab's `shown` event is triggered first if we enter directly to the diff page therefore Breakpoints class is not initialized yet.
parent a7c11fe4
......@@ -73,7 +73,7 @@ class @MergeRequestTabs
@expandView()
else if action == 'diffs'
@loadDiff($target.attr('href'))
if bp.getBreakpointSize() isnt 'lg'
if window.bp isnt undefined and window.bp.getBreakpointSize() isnt 'lg'
@shrinkView()
else if action == 'builds'
@loadBuilds($target.attr('href'))
......
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