Skip to content

Commit

Permalink
Fix Can not read hasOwnProperty of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
hyyan committed Oct 13, 2017
1 parent e426c58 commit fdcfab4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/BBjGridExWidget.js
Expand Up @@ -143,14 +143,14 @@ function bbj_grid_widget_set_state(state) {

function bbj_grid_widget_get_value_formatter(filter) {

return bbj_grid_supported_value_formatter.hasOwnProperty(filter) ?
return bbj_grid_supported_value_formatter && bbj_grid_supported_value_formatter.hasOwnProperty(filter) ?
bbj_grid_supported_value_formatter[filter] : null;
}

function bbj_grid_widget_get_value_formatter_date(data) {

if (
$doc.bbj_grid_widget_meta.hasOwnProperty(data.colDef.field) &&
($doc.bbj_grid_widget_meta && $doc.bbj_grid_widget_meta.hasOwnProperty(data.colDef.field)) &&
$doc.bbj_grid_widget_meta[data.colDef.field].hasOwnProperty('MASK')
) {
return bbj_mask_date(
Expand All @@ -163,7 +163,7 @@ function bbj_grid_widget_get_value_formatter_date(data) {
function bbj_grid_widget_get_value_formatter_number(data) {

if (
$doc.bbj_grid_widget_meta.hasOwnProperty(data.colDef.field) &&
($doc.bbj_grid_widget_meta && $doc.bbj_grid_widget_meta.hasOwnProperty(data.colDef.field)) &&
$doc.bbj_grid_widget_meta[data.colDef.field].hasOwnProperty('MASK')
) {
return bbj_mask_number(
Expand Down

0 comments on commit fdcfab4

Please sign in to comment.