🔨 优化主机逻辑.

This commit is contained in:
lijiahangmax
2025-03-16 00:20:18 +08:00
parent d071ef64d8
commit 0db732fc19
12 changed files with 21 additions and 76 deletions

View File

@@ -1,5 +1,3 @@
import { isEmptyStr } from './index';
/**
* 获取 base64 实际数据
*/
@@ -56,7 +54,7 @@ export function getPathAnalysis(path: string, paths: PathAnalysis[] = []): PathA
return paths;
}
const name = path.substring(lastSeparatorIndex, path.length);
if (!isEmptyStr(name) && name !== '/') {
if (name && name !== '/') {
paths.unshift({
name: name.substring(1, name.length),
path: path