fix: restore original behavior for up/downvoting when logged out

This commit is contained in:
psychobunny
2021-04-13 10:19:45 -04:00
parent b93a2717fd
commit e50408b461

View File

@@ -63,7 +63,8 @@ define('forum/topic/votes', [
delta: delta,
}, function (err) {
if (err) {
if (err.message === '[[error:not-logged-in]]') {
// TODO: err.message is currently hardcoded in helpers/api.js
if (err.message === 'A valid login session was not found. Please log in and try again.') {
ajaxify.go('login');
return;
}