diff --git a/assets/javascripts/discourse/components/wizard-links.js.es6 b/assets/javascripts/discourse/components/wizard-links.js.es6 index 50dadfe6..62c45911 100644 --- a/assets/javascripts/discourse/components/wizard-links.js.es6 +++ b/assets/javascripts/discourse/components/wizard-links.js.es6 @@ -81,7 +81,8 @@ export default Component.extend({ let index = 0; if (items.length) { - index = items.length; + let last_item = items[items.length - 1]; + index = Number(last_item.id.split("_").pop()); } params.index = index; diff --git a/plugin.rb b/plugin.rb index a0094420..90376489 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Create custom wizards -# version: 1.17.0 +# version: 1.17.1 # authors: Angus McLeod # url: https://github.com/paviliondev/discourse-custom-wizard # contact emails: angus@thepavilion.io