diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-05 22:37:15 +0300 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-04-11 03:03:36 +0300 |
commit | fe0aa823252eb468f468c9d813fdc28687c4a4b6 (patch) | |
tree | e349e44d8a758379a157ef42a2e09229417f7378 /app/assets/javascripts/merge_request_tabs.js.coffee | |
parent | a7c11fe47361527798b41d0ee9dc344b144a3b50 (diff) |
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.
Diffstat (limited to 'app/assets/javascripts/merge_request_tabs.js.coffee')
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee index e45f91c2221..3500d796d2d 100644 --- a/app/assets/javascripts/merge_request_tabs.js.coffee +++ b/app/assets/javascripts/merge_request_tabs.js.coffee @@ -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')) |