(fix) Range and Type errors after clearing search box [SCI-9867] (#6877)

This commit is contained in:
Gregor Lasnibat 2024-01-05 15:15:24 +01:00 committed by GitHub
parent 0a70d70c7f
commit 7ab9c4f935
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,9 +117,8 @@
fnReset: function() {
let self = this;
this._fnGetAllColumns().forEach(function(column) {
if (column.sWidth == null) {
return;
}
if (typeof column.sWidth !== 'string' || column.sWidth === null) return;
let widthResult = column.sWidth.match(/(\d+)/i),
oldWidth = widthResult != null ? parseInt(widthResult[0]) : 0,
@ -149,9 +148,8 @@
self.s.state.originalTableWidth = this._fnGetTable().width();
cols.forEach(function (column) {
if (column.sWidth == null) {
return;
}
if (typeof column.sWidth !== 'string' || column.sWidth === null) return;
let widthResult = column.sWidth.match(/(\d+)/i),
oldWidth = widthResult != null ? parseInt(widthResult[0]) : 0,