mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-01 07:24:30 +08:00
修改ensureArray的引入位置
This commit is contained in:
1 parent
6eacff68d3
commit
a835e6d4ac
2 files changed
+6
-1
No files matched your search
@@ -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];
|
||||
}
|
||||
Reference in new issue
Block a user