[FIX] Correcting the case there are no result in admin users list (#21556)

pull/21416/head^2
Jean 4 years ago committed by GitHub
parent 7e0f4c1d48
commit 651eb3f08d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/api/server/v1/users.js

@ -270,7 +270,7 @@ API.v1.addRoute('users.list', { authRequired: true }, {
.toArray(),
);
const { sortedResults: users, totalCount: [{ total }] } = result[0];
const { sortedResults: users, totalCount: [{ total } = { total: 0 }] } = result[0];
return API.v1.success({
users,

Loading…
Cancel
Save