optimalizations

This commit is contained in:
Jan Prochazka
2020-05-01 17:50:12 +02:00
parent 7d36ddbc04
commit d0533f3f08
6 changed files with 38 additions and 16 deletions

View File

@@ -0,0 +1,7 @@
import _ from 'lodash';
export default function getAsArray(obj) {
if (_.isArray(obj)) return obj;
if (obj != null) return [obj];
return [];
}