Skip to content

Commit f8d64d4

Browse files
committed
Reduce code depth
1 parent bad299c commit f8d64d4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/components/VGrid/VGrid.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ const resolveAreas = (input) => {
99

1010
if (Array.isArray(input)) {
1111
output = input.map((n) => {
12-
if (Array.isArray(n)) {
13-
return n.map(m => `"${m}"`).join(' ');
14-
}
15-
16-
return `"${n}"`;
12+
const canMap = Array.isArray(n);
13+
return canMap ? n.map(m => `"${m}"`).join(' ') : `"${n}"`;
1714
}).join(' ');
1815
} else {
1916
output = input;

0 commit comments

Comments
 (0)