mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-31 23:29:27 +08:00
修改ensureArray的引入位置
This commit is contained in:
parent
6eacff68d3
commit
a835e6d4ac
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user