mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
fix: cover edge case of script name
This commit is contained in:
parent
8384d6af35
commit
699740dc34
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ function customScriptName(req) {
|
|||
if (scriptName) {
|
||||
const url = req.nextUrl.clone();
|
||||
const { pathname } = url;
|
||||
const names = scriptName.split(',').map(name => (name + '.js').trim());
|
||||
const names = scriptName.split(',').map(name => name.trim() + '.js');
|
||||
|
||||
if (names.find(name => pathname.endsWith(name))) {
|
||||
url.pathname = '/umami.js';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue