Kaynağa Gözat

update array-utils

Yuki Takei 4 yıl önce
ebeveyn
işleme
a69571d1c1
1 değiştirilmiş dosya ile 1 ekleme ve 3 silme
  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;