mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 03:25:51 +00:00
update Module
This commit is contained in:
@@ -108,7 +108,11 @@ export class Module {
|
||||
return viewPath;
|
||||
}
|
||||
if (this.ctx && this.ctx.baseUrl) {
|
||||
return new URL(viewPath, this.ctx.baseUrl).toString();
|
||||
const baseUrl = this.ctx.baseUrl;
|
||||
const absoluteBase = /^(https?:)?\/\//.test(baseUrl)
|
||||
? baseUrl
|
||||
: `${window.location.origin}/${String(baseUrl).replace(/^\/+/, '')}`;
|
||||
return new URL(viewPath, absoluteBase).toString();
|
||||
}
|
||||
return new URL(viewPath, import.meta.url).toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user