From 415c4fa72adb99e2c47cbba39dcf60b368b4ff28 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Mon, 4 Apr 2022 14:48:06 +0530 Subject: [PATCH] FIX: review queue scrolling is not working after take an action. (#16346) `reject` method for `Reviewable` model is returning an array. So if we use `this.set` method to update `reviewables` attribute in controller then it replaces the model with an array of objects wrongly. This is now fixed by using the `setObjects` method of the model. --- .../javascripts/discourse/app/controllers/review-index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/controllers/review-index.js b/app/assets/javascripts/discourse/app/controllers/review-index.js index 4c194415946..6c2c9a84b14 100644 --- a/app/assets/javascripts/discourse/app/controllers/review-index.js +++ b/app/assets/javascripts/discourse/app/controllers/review-index.js @@ -111,7 +111,7 @@ export default Controller.extend({ if (newList.length === 0) { this.refreshModel(); } else { - this.set("reviewables", newList); + this.reviewables.setObjects(newList); } },