core: fix lint

This commit is contained in:
undefined committed 2021-07-29 15:08:34 +08:00
1 parent a68537cb30
commit 10a1de0741
2 files changed
+1 -4

No files matched your search

-3
View File
@@ -1,9 +1,6 @@
const versionNum = +process.version.replace(/v/gim, '').split('.')[0];
if (versionNum < 14) throw new Error('NodeJS >=v14 required');
if (!global.Hydro) {
global.Hydro = {
version: {
+1 -1
View File
@@ -56,7 +56,7 @@ export class StorageModel {
? await StorageModel.coll.find({ path: { $regex: new RegExp(`^${escapeRegExp(target)}`, 'i') } }).toArray()
: await StorageModel.coll.find({ path: { $regex: new RegExp(`^${escapeRegExp(target)}[^/]+$`) } }).toArray();
return results.map((i) => ({
...i, name: i.path, prefix: i.path.split(target)[1],
...i, name: i.path.split(target)[1], prefix: target,
}));
}