Skip to content
Merged

Dev #3287

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion resources/views/certificate-backend/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
let searchQuery = '';

function apiUrl(path, params = {}) {
const u = new URL(basePath + path.replace(/^\//, ''), window.location.origin);
const segment = path.replace(/^\//, '');
const u = new URL(segment ? basePath + '/' + segment : basePath, window.location.origin);
u.searchParams.set('edition', editionSelect.value);
u.searchParams.set('type', typeSlug);
Object.entries(params).forEach(([k, v]) => { if (v !== undefined && v !== '') u.searchParams.set(k, v); });
Expand Down
Loading