Skip to content

Commit 8751dc2

Browse files
committed
FIX: Prevent exception for non-subscribers
1 parent f45a117 commit 8751dc2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

assets/javascripts/discourse/controllers/admin-wizards-wizard-show.js.es6

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,11 @@ export default Controller.extend({
9494
},
9595

9696
setAfterTimeGroupIds() {
97+
if (!this.wizard.after_time_groups) {
98+
return;
99+
}
97100
const groups = this.site.groups.filter((g) =>
98-
this.wizard.after_time_groups?.includes(g.name)
101+
this.wizard.after_time_groups.includes(g.name)
99102
);
100103
this.setProperties({
101104
afterTimeGroupIds: groups.map((g) => g.id),

assets/javascripts/discourse/routes/admin-wizards-wizard-show.js.es6

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default DiscourseRoute.extend({
4444
currentStep: wizard.steps[0],
4545
currentAction: wizard.actions[0],
4646
creating: model.create,
47+
afterTimeGroupIds: [],
4748
};
4849

4950
controller.setProperties(props);

plugin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22
# name: discourse-custom-wizard
33
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
4-
# version: 2.9.1
4+
# version: 2.9.2
55
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
66
# url: https://github.com/paviliondev/discourse-custom-wizard
77
# contact_emails: [email protected]

0 commit comments

Comments
 (0)