mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Merge pull request #1127 from Zxilly/master
fix: cover edge case of script name
This commit is contained in:
commit
08dff1293e
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ function customScriptName(req) {
|
||||||
if (scriptName) {
|
if (scriptName) {
|
||||||
const url = req.nextUrl.clone();
|
const url = req.nextUrl.clone();
|
||||||
const { pathname } = url;
|
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))) {
|
if (names.find(name => pathname.endsWith(name))) {
|
||||||
url.pathname = '/umami.js';
|
url.pathname = '/umami.js';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue