mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-18 05:04:30 +08:00
修改ensureArray的引入位置
This commit is contained in:
1 parent
6eacff68d3
commit
a835e6d4ac
2 files changed
+6
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import axios, { AxiosResponse } from 'axios';
|
||||
import { Disposable } from '../common/disposable';
|
||||
import { ensureArray } from '../../plugin/game/utils';
|
||||
import { ensureArray } from '../../plugin/utils';
|
||||
import { has } from '../../plugin/utils';
|
||||
import JSZip from 'jszip';
|
||||
import { EmitableEvent, EventEmitter } from '../common/eventEmitter';
|
||||
|
||||
@@ -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