Skip to content

Commit 6658210

Browse files
committed
Fix #83 Check layout for null before use.
1 parent 7d58a6a commit 6658210

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

angular-deckgrid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ angular.module('akoenig.deckgrid').factory('Deckgrid', [
367367
// Okay, the layout has changed.
368368
// Creating a new column structure is not avoidable.
369369
//
370-
if (layout.columns !== this.$$scope.layout.columns) {
370+
if (layout && layout.columns !== this.$$scope.layout.columns) {
371371
self.$$scope.layout = layout;
372372

373373
self.$$scope.$apply(function onApply () {

angular-deckgrid.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"devDependencies": {
1212
"grunt-contrib-uglify": "~0.2.2",
1313
"grunt-contrib-jshint": "~0.7.1",
14-
"grunt": "~0.4.1"
15-
, "grunt-contrib-concat": "~0.3.0",
14+
"grunt": "~0.4.1",
15+
"grunt-contrib-concat": "~0.3.0",
1616
"grunt-karma": "~0.7.1",
17+
"karma": "~0.12.0",
1718
"karma-jasmine": "~0.1.5",
1819
"karma-chrome-launcher": "~0.1.2"
1920
},

src/deckgrid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ angular.module('akoenig.deckgrid').factory('Deckgrid', [
219219
// Okay, the layout has changed.
220220
// Creating a new column structure is not avoidable.
221221
//
222-
if (layout.columns !== this.$$scope.layout.columns) {
222+
if (layout && layout.columns !== this.$$scope.layout.columns) {
223223
self.$$scope.layout = layout;
224224

225225
self.$$scope.$apply(function onApply () {

0 commit comments

Comments
 (0)