浏览代码

update array-utils

Yuki Takei 4 年之前
父节点
当前提交
a69571d1c1
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      packages/app/src/utils/array-utils.ts

+ 1 - 3
packages/app/src/utils/array-utils.ts

@@ -1,6 +1,6 @@
 // converts non-array item to array
 
-const toArrayIfNot = (item) => {
+export const toArrayIfNot = (item?: unknown): any[] => {
   if (item == null) {
     return [];
   }
@@ -11,5 +11,3 @@ const toArrayIfNot = (item) => {
 
   return [item];
 };
-
-module.exports = toArrayIfNot;