修正方法名称 review by yewanwan
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -6,7 +6,7 @@ export default function trimObject(obj) { | @@ -6,7 +6,7 @@ export default function trimObject(obj) { | ||
6 | } | 6 | } |
7 | 7 | ||
8 | return Object.keys(obj).reduce(function(acc, key) { | 8 | return Object.keys(obj).reduce(function(acc, key) { |
9 | - acc[key.trim()] = typeof obj[key] == 'string' ? obj[key].trim() : trimObj(obj[key]); | 9 | + acc[key.trim()] = typeof obj[key] == 'string' ? obj[key].trim() : trimObject(obj[key]); |
10 | return acc; | 10 | return acc; |
11 | }, Array.isArray(obj) ? [] : {}); | 11 | }, Array.isArray(obj) ? [] : {}); |
12 | } | 12 | } |
-
Please register or login to post a comment