Browse Source

showRow & hideRow param checks, see #1742

As seen in #1742, the param checks now require 'both' param, instead of option of which is most relevent.

Not sure when this snuck in, but easy fix.
dabros 10 years ago
parent
commit
4fd2d9602d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/bootstrap-table.js

+ 2 - 2
src/bootstrap-table.js

@@ -2308,14 +2308,14 @@
     };
 
     BootstrapTable.prototype.showRow = function (params) {
-        if (!params.hasOwnProperty('index') || !params.hasOwnProperty('uniqueId')) {
+        if (!params.hasOwnProperty('index') && !params.hasOwnProperty('uniqueId')) {
             return;
         }
         this.toggleRow(params.index, params.uniqueId, true);
     };
 
     BootstrapTable.prototype.hideRow = function (params) {
-        if (!params.hasOwnProperty('index') || !params.hasOwnProperty('uniqueId')) {
+        if (!params.hasOwnProperty('index') && !params.hasOwnProperty('uniqueId')) {
             return;
         }
         this.toggleRow(params.index, params.uniqueId, false);