Skip to content

Commit

Permalink
Don't rely on multi-language tabs-panel being present
Browse files Browse the repository at this point in the history
On decidim organizations which have only one language activated, the editors are not wrapped into .tabs-panel elements. On these platforms, the proposal answer template body was not being filled in, because the editor was not found.
  • Loading branch information
carlobeltrame authored May 16, 2023
1 parent eae8d19 commit 0d111ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $(() => {
}).done((data) => {
$(`#proposal_answer_internal_state_${data.state}`).trigger("click");

const $editors = $dropDown.parent().parent().find(".tabs-panel").find(".editor-container");
const $editors = $dropDown.parent().parent().find(".editor-container");
$editors.each((index, element) => {
const localElement = $(element);
const $locale = localElement.siblings("input[type=hidden]").attr("id").replace("proposal_answer_answer_", "");
Expand Down

0 comments on commit 0d111ce

Please sign in to comment.