Small fix

This commit is contained in:
saplf
2019-09-08 17:37:56 +08:00
parent b65b7c611e
commit 240daa107e
7 changed files with 44 additions and 25 deletions

View File

@@ -97,7 +97,7 @@ async function filter<T>(
function groupUrl(url: string, params?: any): string {
const postfix = _.keys(params || {})
.map(key => `${key}=${encodeURIComponent(params[key]) || ''}`)
.map(key => `${key}=${encodeURIComponent(params[key] || '') || ''}`)
.join('&');
if (!postfix) return url;
return `${url}?${postfix}`;