Skip to content

Commit

Permalink
Merge pull request #6943 from ProcessMaker/bugfix/FOUR-16291
Browse files Browse the repository at this point in the history
Bugfix/FOUR-16291: Error in Saved search configuration
  • Loading branch information
ryancooley authored Jul 24, 2024
2 parents 56e3e66 + f0f9df2 commit 165e3be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/js/components/common/mixins/datatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 165e3be

Please sign in to comment.