From 78f1c3278d3a5ff72ef58b42c8f6614015253694 Mon Sep 17 00:00:00 2001 From: zhixin Date: Fri, 8 Dec 2017 22:19:47 +0800 Subject: [PATCH] Fix #3487, #3486: return when fieldIndex is -1 --- src/bootstrap-table.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bootstrap-table.js b/src/bootstrap-table.js index 99948cf672..77a51abff6 100644 --- a/src/bootstrap-table.js +++ b/src/bootstrap-table.js @@ -1983,6 +1983,10 @@ var field = that.header.fields[i], fieldIndex = $.inArray(field, that.getVisibleFields()); + if (fieldIndex === -1) { + return; + } + if (that.options.detailView && !that.options.cardView) { fieldIndex += 1; }