mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-06 20:10:12 +02:00
fix undefined / null parameter string for Subsonic (#1978)
This commit is contained in:
@@ -376,6 +376,16 @@ axiosClient.interceptors.response.use(
|
||||
},
|
||||
);
|
||||
|
||||
const keysToSkipEmptyCheck = new Set([
|
||||
'artist',
|
||||
'comment',
|
||||
'genre',
|
||||
'name',
|
||||
'query',
|
||||
'u',
|
||||
'username',
|
||||
]);
|
||||
|
||||
const parsePath = (fullPath: string) => {
|
||||
const [path, params] = fullPath.split('?');
|
||||
|
||||
@@ -383,7 +393,7 @@ const parsePath = (fullPath: string) => {
|
||||
const notNilParams: Record<string, string[]> = {};
|
||||
|
||||
for (const [key, value] of url) {
|
||||
if (value === 'undefined' || value === 'null') {
|
||||
if (!keysToSkipEmptyCheck.has(key) && (value === 'undefined' || value === 'null')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user