From 21e235be4042d9cbc087aa66477d7ee5803a1bf5 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Sun, 4 Feb 2018 17:31:26 +0800 Subject: [PATCH] Ensure submissions model has id --- .../discourse/routes/admin-wizards-submissions.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/routes/admin-wizards-submissions.js.es6 b/assets/javascripts/discourse/routes/admin-wizards-submissions.js.es6 index 214f4b4d..0988b7b2 100644 --- a/assets/javascripts/discourse/routes/admin-wizards-submissions.js.es6 +++ b/assets/javascripts/discourse/routes/admin-wizards-submissions.js.es6 @@ -6,7 +6,7 @@ export default Discourse.Route.extend({ }, afterModel(model, transition) { - if (transition.intent.name !== 'adminWizardSubmissions' && model.length > 0) { + if (transition.intent.name !== 'adminWizardSubmissions' && model[0] && model[0].id) { this.transitionTo('adminWizardSubmissions', model[0].id); } },