Merge pull request #31 from HorlogeSkynet/fix/redirection_existing_feeds

Fixes redirection to existing feeds
This commit is contained in:
Darius Kazemi 2019-05-22 14:07:23 -07:00 committed by GitHub
commit 24d4c7fbf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ fetch(`/api/convert/?feed=${feed}&username=${username}`)
// a feed exists in the database // a feed exists in the database
if (myJson.content) { if (myJson.content) {
// was it a match on feed // was it a match on feed
if (myJson.feed === feed) { if (myJson.feed === decodeURIComponent(feed)) {
console.log('feed match!'); console.log('feed match!');
out.innerHTML = `<p>This feed already exists! Follow @${myJson.username}@${domain}.</p>`; out.innerHTML = `<p>This feed already exists! Follow @${myJson.username}@${domain}.</p>`;
window.location = `/u/${myJson.username}`; window.location = `/u/${myJson.username}`;