jqgrid_utils 1.26.1 → 1.26.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1250,8 +1250,17 @@ async add_link_details(col_model, url, edit_field, attr = '', keys, format)
1250
1250
  {
1251
1251
  col_model[i]['formatter'] = function(cell_val, obj)
1252
1252
  {
1253
- let key_val = cell_val;
1254
- const t = cell_val.toString();
1253
+ cell_val = String(cell_val);
1254
+ let key_val = '';
1255
+ if(cell_val)
1256
+ {
1257
+ key_val = cell_val;
1258
+ }
1259
+ let t = '';
1260
+ if(cell_val) {
1261
+ t = cell_val.toString();
1262
+ }
1263
+
1255
1264
  if (typeof keys === 'object')
1256
1265
  {
1257
1266
  let pref = '';
@@ -1282,6 +1291,7 @@ async add_link_details(col_model, url, edit_field, attr = '', keys, format)
1282
1291
  pref = pref.slice(0, -1);
1283
1292
  }
1284
1293
  const _cell_val = self.__cell_format(cell_val, format);
1294
+
1285
1295
  if(t !='')
1286
1296
  {
1287
1297
  cell_val = '<a ' + attr + 'href="' + url + pref + '"> ' + _cell_val + '</a>';
package/jqgrid_utils.js CHANGED
@@ -1249,8 +1249,17 @@ async add_link_details(col_model, url, edit_field, attr = '', keys, format)
1249
1249
  {
1250
1250
  col_model[i]['formatter'] = function(cell_val, obj)
1251
1251
  {
1252
- let key_val = cell_val;
1253
- const t = cell_val.toString();
1252
+ cell_val = String(cell_val);
1253
+ let key_val = '';
1254
+ if(cell_val)
1255
+ {
1256
+ key_val = cell_val;
1257
+ }
1258
+ let t = '';
1259
+ if(cell_val) {
1260
+ t = cell_val.toString();
1261
+ }
1262
+
1254
1263
  if (typeof keys === 'object')
1255
1264
  {
1256
1265
  let pref = '';
@@ -1281,6 +1290,7 @@ async add_link_details(col_model, url, edit_field, attr = '', keys, format)
1281
1290
  pref = pref.slice(0, -1);
1282
1291
  }
1283
1292
  const _cell_val = self.__cell_format(cell_val, format);
1293
+
1284
1294
  if(t !='')
1285
1295
  {
1286
1296
  cell_val = '<a ' + attr + 'href="' + url + pref + '"> ' + _cell_val + '</a>';
package/package.json CHANGED
@@ -29,5 +29,5 @@
29
29
  {
30
30
  "test": "echo \"Error: no test specified\" && exit 1"
31
31
  },
32
- "version": "1.26.1"
32
+ "version": "1.26.3"
33
33
  }