We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55af56b commit 65c1a83Copy full SHA for 65c1a83
src/lib/sources/hyperparamSource.ts
@@ -16,10 +16,7 @@ function canParse(sourceId: string): boolean {
16
17
function getSourceParts(sourceId: string): SourcePart[] {
18
const parts = sourceId.split('/')
19
- if (parts[parts.length - 1] === '') {
20
- parts.pop()
21
- }
22
- return [
+ const sourceParts = [
23
{ 'text': '/', 'sourceId': '' },
24
...parts.map((part, depth) => {
25
const slashSuffix = depth === parts.length - 1 ? '' : '/'
@@ -29,6 +26,10 @@ function getSourceParts(sourceId: string): SourcePart[] {
29
26
}
30
27
}),
31
28
]
+ if (sourceParts[sourceParts.length - 1]?.text === '') {
+ sourceParts.pop()
+ }
32
+ return sourceParts
33
34
35
function getKind(sourceId: string): FileKind {
0 commit comments