diff --git a/resources/js/components/common/mixins/datatable.js b/resources/js/components/common/mixins/datatable.js index 257b8bd61a..85271c6259 100644 --- a/resources/js/components/common/mixins/datatable.js +++ b/resources/js/components/common/mixins/datatable.js @@ -109,6 +109,9 @@ export default { // Some controllers return each row as a json object to preserve integer keys (ie saved search) jsonRows(rows) { if (rows.length === 0 || !(_.has(_.head(rows), "_json"))) { + if (!Array.isArray(rows) && typeof rows === "object") { + return Object.values(rows); + } return rows; } return rows.map((row) => JSON.parse(row._json));