This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 2d182c8aa87c5352759de4c63211593b8b6423ef Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Sep 7 17:14:33 2018 +0200 ref #225 : Erreur à la création d'un sondage avec un seul choix --- pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html | 12 +++++++++--- .../src/main/web/tag/poll/EditVoteOrder.tag.html | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html index e331da8f..8b73225e 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Choices.tag.html @@ -83,9 +83,15 @@ }); this.getChoicesDragTab = () => { - return Array.isArray(this.refs.choicesDrag) ? this.refs.choicesDrag : ( - this.refs.choicesDrag ? [this.refs.choicesDrag] : [] - ); + let choices = this.refs.choicesDrag; + if (!Array.isArray(choices)) { + if (choices) { + choices = [choices]; + } else { + choices = []; + } + } + return choices; }; this.placeChoices = noAnim => { diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html index 77069933..bbdf5ccd 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/EditVoteOrder.tag.html @@ -148,9 +148,15 @@ }); this.getChoicesTab = () => { - return Array.isArray(this.refs.choices) ? this.refs.choices : ( - this.refs.choices ? [this.refs.choices] : [] - ); + let choices = this.refs.choices; + if (!Array.isArray(choices)) { + if (choices) { + choices = [choices]; + } else { + choices = []; + } + } + return choices; }; this.placeChoices = noAnim => { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.