From ef610af3288eca85ef646c83c449387ca6923383 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 2 Oct 2019 07:51:23 -0400 Subject: [PATCH] FIX: exception with triggerRefresh and subcat listing (#8131) Clicking fast on the "top", "unread", or "latest" button when browsing a parent category page with subcategories and the setting `Show subcategory list above topics in this category` enabled would cause an exception: ``` Uncaught Error: Nothing handled the action 'triggerRefresh'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble. ``` --- .../javascripts/discourse/routes/build-category-route.js.es6 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/discourse/routes/build-category-route.js.es6 b/app/assets/javascripts/discourse/routes/build-category-route.js.es6 index b2a5a00ae5f..c1db98d7779 100644 --- a/app/assets/javascripts/discourse/routes/build-category-route.js.es6 +++ b/app/assets/javascripts/discourse/routes/build-category-route.js.es6 @@ -200,6 +200,10 @@ export default (filterArg, params) => { actions: { setNotification(notification_level) { this.currentModel.setNotification(notification_level); + }, + + triggerRefresh() { + this.refresh(); } } });