Skip to content

Commit 0b665b1

Browse files
prx-lmomportuga
authored andcommitted
extra security
1 parent 22ff93e commit 0b665b1

File tree

1 file changed

+3
-3
lines changed
  • packages/core/src/js/factories

1 file changed

+3
-3
lines changed

packages/core/src/js/factories/Grid.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ angular.module('ui.grid')
686686
* @param {string} name column name
687687
*/
688688
Grid.prototype.getColumn = function getColumn(name) {
689-
if (angular.isFunction(this.columns.find)) {
689+
if (this.columns && angular.isFunction(this.columns.find)) {
690690
return this.columns.find(function (column) {
691691
return column.colDef.name === name;
692692
}) || null;
@@ -711,7 +711,7 @@ angular.module('ui.grid')
711711
* @param {string} name column.field
712712
*/
713713
Grid.prototype.getColDef = function getColDef(name) {
714-
if (angular.isFunction(this.options.columnsDefs.find)) {
714+
if (this.options.columnsDefs && angular.isFunction(this.options.columnsDefs.find)) {
715715
return this.options.columnsDefs.find(function (colDef) {
716716
return colDef.name === name;
717717
}) || null;
@@ -1106,7 +1106,7 @@ angular.module('ui.grid')
11061106
Grid.prototype.getRow = function getRow(rowEntity, lookInRows) {
11071107
var self = this;
11081108
lookInRows = lookInRows == void 0 ? this.rows : lookInRows;
1109-
if (angular.isFunction(lookInRows.find)) {
1109+
if (lookInRows && angular.isFunction(lookInRows.find)) {
11101110
return lookInRows.find(function (row) {
11111111
return self.options.rowEquality(row.entity, rowEntity);
11121112
}) || null;

0 commit comments

Comments
 (0)