Browse Source

change "map" to "forEach"

ryuichi-e 6 years ago
parent
commit
1d83992914
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/server/routes/apiv3/users.js

+ 1 - 2
src/server/routes/apiv3/users.js

@@ -429,11 +429,10 @@ module.exports = (crowi) => {
   validator.statusList = [
     body('statusList').custom((value) => {
       const error = [];
-      value.map((status) => {
+      value.forEach((status) => {
         if (!correctStatusList.includes(status)) {
           error.push(status);
         }
-        return (error.length === 0);
       });
       return (error.length === 0);
     }),