From 0ffb81308e2e2d9e9deebd56d82e4f077a04b667 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 1 Sep 2015 16:31:23 -0400 Subject: [PATCH] closes #3538 --- public/src/client/topic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/client/topic.js b/public/src/client/topic.js index bfbd984549..12363e08bf 100644 --- a/public/src/client/topic.js +++ b/public/src/client/topic.js @@ -152,8 +152,8 @@ define('forum/topic', [ return 0; } - while (lastPart > 0 && !components.get('post/anchor', lastPart).length) { - lastPart --; + if (lastPart > 0 && !components.get('post/anchor', lastPart).length) { + return components.get('post/anchor').last().attr('name'); } return lastPart;