From be3a479270a24381f95a5ecd3eed880de8897514 Mon Sep 17 00:00:00 2001 From: jumagura Date: Tue, 27 Dec 2022 12:30:27 -0400 Subject: [PATCH] FIX: Show an empty submission list of no wizard is selected --- .../discourse/routes/admin-wizards-submissions-show.js.es6 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/javascripts/discourse/routes/admin-wizards-submissions-show.js.es6 b/assets/javascripts/discourse/routes/admin-wizards-submissions-show.js.es6 index b616b5be..b9dbd90f 100644 --- a/assets/javascripts/discourse/routes/admin-wizards-submissions-show.js.es6 +++ b/assets/javascripts/discourse/routes/admin-wizards-submissions-show.js.es6 @@ -8,6 +8,12 @@ export default DiscourseRoute.extend({ return CustomWizardAdmin.submissions(params.wizardId); }, + afterModel(model) { + if (model === null) { + return this.transitionTo("adminWizardsSubmissions"); + } + }, + setupController(controller, model) { const { fields, submissions } = formatModel(model);