mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
fix: socram code
This commit is contained in:
parent
80caba88b5
commit
551027b7a7
@ -43,14 +43,14 @@ export const CDNRouter = {
|
||||
return new Proxy(noop, {
|
||||
get: (_, key: string) => {
|
||||
if (key === 'get') {
|
||||
return (value: string | undefined, options?: CDNUrlOptions) => {
|
||||
return (value: string | CDNUrlOptions | undefined, options?: CDNUrlOptions) => {
|
||||
const lastRoute = `${CDN_URL}/${route.join('/')}`;
|
||||
let routeResult = lastRoute;
|
||||
if (value && typeof value === 'string') {
|
||||
routeResult = `${lastRoute}/${value}`;
|
||||
if (typeof value === 'string') {
|
||||
routeResult = `${lastRoute}${value ? `/${value}` : ''}`;
|
||||
return parseCDNURL(routeResult, options);
|
||||
}
|
||||
return parseCDNURL(routeResult, options);
|
||||
return parseCDNURL(routeResult, value);
|
||||
};
|
||||
}
|
||||
return this.createProxy([...route, key]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user