diff --git a/wagtail_footnotes/static/footnotes/js/footnotes.js b/wagtail_footnotes/static/footnotes/js/footnotes.js index 0e79c47..153a28a 100644 --- a/wagtail_footnotes/static/footnotes/js/footnotes.js +++ b/wagtail_footnotes/static/footnotes/js/footnotes.js @@ -49,13 +49,15 @@ class FootnoteSource extends React.Component { var live_footnotes = document.querySelectorAll( "#id_footnotes-FORMS > li:not(.deleted)" ); - Array.prototype.forEach.call(live_footnotes, function (value) { + Array.prototype.forEach.call(live_footnotes, function (value, i) { var text = $(".public-DraftEditor-content", value).text(); var uuid = $('input[id*="-uuid"]', value)[0].value; + const index = i + 1; var row = $( "" + + "[" + index + "] " + text + "" + uuid.substring(0, 6) +