修改ensureArray的引入位置

This commit is contained in:
AncTe committed 2023-06-17 18:02:48 +08:00
1 parent 6eacff68d3
commit a835e6d4ac
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -253,3 +253,8 @@ export async function swapChapter(chapter: number, hard: number) {
core.drawTip('读档成功');
});
}
export function ensureArray<T>(arr: T): T extends any[] ? T : T[] {
// @ts-ignore
return arr instanceof Array ? arr : [arr];
}