Check data for null before trying to manipulate it. Closes #1391

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2020-05-28 21:38:14 +01:00
parent 789470c1b2
commit 39ac2026b0
4 changed files with 20 additions and 0 deletions
+5
View File
@@ -176,6 +176,11 @@ function initTable() {
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-adlists-table");
// Return if not available
if (data === null) {
return null;
}
// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
+5
View File
@@ -210,6 +210,11 @@ function initTable() {
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-clients-table");
// Return if not available
if (data === null) {
return null;
}
// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table
+5
View File
@@ -251,6 +251,11 @@ function initTable() {
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-domains-table");
// Return if not available
if (data === null) {
return null;
}
// Reset visibility of ID column
data.columns[0].visible = false;
// Show group assignment column only on full page
+5
View File
@@ -91,6 +91,11 @@ $(document).ready(function () {
},
stateLoadCallback: function () {
var data = utils.stateLoadCallback("groups-table");
// Return if not available
if (data === null) {
return null;
}
// Reset visibility of ID column
data.columns[0].visible = false;
// Apply loaded state to table