0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Handled trailing slash for site url

no issue

- Site url might be added with trailing slash, which causes site apis to be called with double slash
- Removes trailing slash from siteUrl if present
This commit is contained in:
Rish 2020-07-09 11:08:40 +05:30
parent db6e02b3fa
commit e721d9242b

View file

@ -1,6 +1,7 @@
/* eslint-disable no-console */
function handleDataAttributes({siteUrl}) {
siteUrl = siteUrl.replace(/\/$/, '');
Array.prototype.forEach.call(document.querySelectorAll('form[data-members-form]'), function (form) {
let errorEl = form.querySelector('[data-members-error]');
function submitHandler(event) {