From 86c00ac6adfa2e68f199f3720e58684e45115660 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 8 Mar 2018 15:26:29 +1100 Subject: [PATCH] stop using deprecated size() --- .../javascripts/discourse/lib/keyboard-shortcuts.js.es6 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 index e65240981e0..8746f872059 100644 --- a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 +++ b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 @@ -323,7 +323,7 @@ export default { if ($selected.length !== 0) { //boundries check // loop is not allowed if (direction === -1 && index === 0) { return; } - if (direction === 1 && index === ($articles.size()-1) ) { return; } + if (direction === 1 && index === ($articles.length - 1) ) { return; } } // if nothing is selected go to the first post on screen @@ -348,7 +348,7 @@ export default { const $article = $articles.eq(index + direction); - if ($article.size() > 0) { + if ($article.length > 0) { $articles.removeClass('selected'); $article.addClass('selected'); @@ -396,10 +396,10 @@ export default { const $topicList = $('.topic-list'), $topicArea = $('.posts-wrapper'); - if ($topicArea.size() > 0) { + if ($topicArea.length > 0) { return $('.posts-wrapper .topic-post, .topic-list tbody tr'); } - else if ($topicList.size() > 0) { + else if ($topicList.length > 0) { return $topicList.find('.topic-list-item'); } },