mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-24 12:08:28 +00:00
fix: double slash
This commit is contained in:
parent
48d0ffe868
commit
d4512f360b
@ -124,7 +124,8 @@ let sampleCache = { current: undefined };
|
|||||||
export const samples = async (sampleMap, baseUrl = sampleMap._base || '') => {
|
export const samples = async (sampleMap, baseUrl = sampleMap._base || '') => {
|
||||||
if (typeof sampleMap === 'string') {
|
if (typeof sampleMap === 'string') {
|
||||||
if (sampleMap.startsWith('github:')) {
|
if (sampleMap.startsWith('github:')) {
|
||||||
const [_, path] = sampleMap.split('github:');
|
let [_, path] = sampleMap.split('github:');
|
||||||
|
path = path.endsWith('/') ? path.slice(0, -1) : path;
|
||||||
sampleMap = `https://raw.githubusercontent.com/${path}/strudel.json`;
|
sampleMap = `https://raw.githubusercontent.com/${path}/strudel.json`;
|
||||||
}
|
}
|
||||||
if (typeof fetch !== 'function') {
|
if (typeof fetch !== 'function') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user