Skip to content

Commit

Permalink
fix: restore original behavior for up/downvoting when logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobunny committed Apr 13, 2021
1 parent b93a271 commit e50408b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/src/client/topic/votes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e50408b

Please sign in to comment.