Skip to content

Commit c2ad4c1

Browse files
authored
Merge pull request #241 from plausible/domain_name_subdir_fix
Fixed: domain_name values with more than one subdirs would result in a 404 when attempting to create a token.
2 parents a616922 + 4ec3cec commit c2ad4c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

assets/src/js/admin/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ document.addEventListener('DOMContentLoaded', () => {
264264
e.preventDefault();
265265

266266
let domain = document.getElementById('domain_name').value;
267-
domain = domain.replace('/', '%2F');
267+
domain = domain.replaceAll('/', '%2F');
268268

269269
window.open(`${plausible_analytics_hosted_domain}/${domain}/settings/integrations?new_token=WordPress`, '_blank', 'location=yes,height=768,width=1024,scrollbars=yes,status=no');
270270
},

0 commit comments

Comments
 (0)