mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
save wysiwyg image size in url params instead of html tags (#10054)
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
export function addQueryToPath(path: string, query: Record<string, string>): string {
|
||||
const queryParams = [];
|
||||
const queryParams = new URLSearchParams(path.split('?')[1] || '');
|
||||
|
||||
for (const [key, value] of Object.entries(query)) {
|
||||
queryParams.push(`${key}=${value}`);
|
||||
queryParams.set(key, value);
|
||||
}
|
||||
|
||||
return path.includes('?') ? `${path}&${queryParams.join('&')}` : `${path}?${queryParams.join('&')}`;
|
||||
return path.split('?')[0] + '?' + queryParams;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user