From 486c11882b092ac01f6d94b25b1bd5e827c949c9 Mon Sep 17 00:00:00 2001 From: Ivan Kurnosov Date: Fri, 10 Apr 2015 08:43:29 +1200 Subject: [PATCH] All local variables must be prepended with `var` Otherwise it causes problems in `'use strict';` mode --- dist/js/sb-admin-2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/js/sb-admin-2.js b/dist/js/sb-admin-2.js index 5be2c88..46bef06 100644 --- a/dist/js/sb-admin-2.js +++ b/dist/js/sb-admin-2.js @@ -9,8 +9,8 @@ $(function() { // Sets the min-height of #page-wrapper to window size $(function() { $(window).bind("load resize", function() { - topOffset = 50; - width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; + var topOffset = 50; + var width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; if (width < 768) { $('div.navbar-collapse').addClass('collapse'); topOffset = 100; // 2-row-menu @@ -18,7 +18,7 @@ $(function() { $('div.navbar-collapse').removeClass('collapse'); } - height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; + var height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; height = height - topOffset; if (height < 1) height = 1; if (height > topOffset) {