Skip to content
Snippets Groups Projects
Commit bd8d5874 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

prevent undefined error & remove unexistent function

parent 37c38559
No related branches found
No related tags found
1 merge request!72REDMINE_ISSUE-11919
<template>
<div class="fourteen wide column">
<div
:class="{active: loading}"
class="ui inverted dimmer"
>
<div :class="{ active: loading }" class="ui inverted dimmer">
<div class="ui text loader">
Projet en cours de création. Vous allez être redirigé.
</div>
......@@ -346,7 +343,7 @@ export default {
postProjectThumbnail(projectSlug) {
//* send img to the backend when feature_type is created
if (this.isValidImage(this.fileToImport)) {
if (this.fileToImport) {
let formData = new FormData();
formData.append("file", this.fileToImport);
const url =
......@@ -432,7 +429,7 @@ export default {
this.loading = false;
})
.catch((error) => {
if (error.response.data.title[0]) {
if (error.response && error.response.data.title[0]) {
this.errors.title.push(error.response.data.title[0]);
}
this.loading = false;
......@@ -455,7 +452,7 @@ export default {
}
})
.catch((error) => {
if (error.response.data.title[0]) {
if (error.response && error.response.data.title[0]) {
this.errors.title.push(error.response.data.title[0]);
}
throw error;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment