diff options
author | Phil Hughes <me@iamphill.com> | 2017-08-10 16:02:30 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-10 16:02:30 +0300 |
commit | 3fc89919a8050b19e068b48abc12ac6a1dbe958a (patch) | |
tree | cfaa31964ebf44b71fca64abd76f01af936a508a /app/assets/javascripts/build.js | |
parent | 61033b2d4f7084141a6b8f45e9114ca5e86a73ce (diff) |
removed global use of breakpoint checker
Diffstat (limited to 'app/assets/javascripts/build.js')
-rw-r--r-- | app/assets/javascripts/build.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js index 940326dcd33..ae1a23132a7 100644 --- a/app/assets/javascripts/build.js +++ b/app/assets/javascripts/build.js @@ -1,8 +1,7 @@ /* eslint-disable func-names, wrap-iife, no-use-before-define, consistent-return, prefer-rest-params */ -/* global Breakpoints */ - import _ from 'underscore'; +import bp from './breakpoints'; import { bytesToKiB } from './lib/utils/number_utils'; window.Build = (function () { @@ -34,8 +33,6 @@ window.Build = (function () { this.$scrollBottomBtn = $('.js-scroll-down'); clearTimeout(Build.timeout); - // Init breakpoint checker - this.bp = Breakpoints.get(); this.initSidebar(); this.populateJobs(this.buildStage); @@ -230,7 +227,7 @@ window.Build = (function () { }; Build.prototype.shouldHideSidebarForViewport = function () { - const bootstrapBreakpoint = this.bp.getBreakpointSize(); + const bootstrapBreakpoint = bp.getBreakpointSize(); return bootstrapBreakpoint === 'xs' || bootstrapBreakpoint === 'sm'; }; |