Skip to content

Commit f92c2cd

Browse files
authored
FIX: Wizard id increment fix (#177)
* increment object ids based on last object id * Bump version * Apply prettier
1 parent 51553bc commit f92c2cd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

assets/javascripts/discourse/components/wizard-links.js.es6

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ export default Component.extend({
8181

8282
let index = 0;
8383
if (items.length) {
84-
index = items.length;
84+
let last_item = items[items.length - 1];
85+
index = Number(last_item.id.split("_").pop());
8586
}
8687

8788
params.index = index;

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: Create custom wizards
4-
# version: 1.17.0
4+
# version: 1.17.1
55
# authors: Angus McLeod
66
# url: https://github.com/paviliondev/discourse-custom-wizard
77
# contact emails: angus@thepavilion.io

0 commit comments

Comments
 (0)