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 9f0b04b1c79656bcc0fdcba095e92411d9472acf Author: Kevin Morin <morin@codelutin.com> Date: Thu Aug 3 18:01:45 2017 +0200 fixes #107 Choix de type resource avec un fichier sans extension --- pollen-ui-riot-js/src/main/web/js/Poll.js | 3 ++- pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/js/Poll.js b/pollen-ui-riot-js/src/main/web/js/Poll.js index de26cf54..a562df62 100644 --- a/pollen-ui-riot-js/src/main/web/js/Poll.js +++ b/pollen-ui-riot-js/src/main/web/js/Poll.js @@ -107,7 +107,8 @@ class Poll { addChoice(choice) { if (this.id) { let promise; - if (choice.choiceType === "RESOURCE" && choice.choiceValue.type) { + console.log(choice) + if (choice.choiceType === "RESOURCE" && choice.choiceValue) { promise = resourceService.create(choice.choiceValue, "CHOICE").then((result) => { choice.choiceValue = result.id; return Promise.resolve(choice); diff --git a/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html b/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html index e91c43f1..a89ae155 100644 --- a/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/poll/Choice.tag.html @@ -193,7 +193,9 @@ require("../components/time-picker.tag.html"); delete this.originalFile; } else { this.refs.choiceResource.value = ""; - this.refs.imagePreview.src = ""; + if (this.refs.imagePreview) { + this.refs.imagePreview.src = ""; + } delete this.newFile; } }; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.