@@ -134,7 +134,7 @@ export default {
134134 async uploadAttachmentFile (file , position = null ) {
135135 this .state .isUploadingAttachments = true
136136
137- return this .syncService ? .uploadAttachment (file)
137+ return this .syncService .uploadAttachment (file)
138138 .then ((response ) => {
139139 this .insertAttachment (
140140 response .data ? .name , response .data ? .id , file .type ,
@@ -168,7 +168,7 @@ export default {
168168
169169 this .state .isUploadingAttachments = true
170170
171- return this .syncService ? .insertAttachmentFile (filePath).then ((response ) => {
171+ return this .syncService .insertAttachmentFile (filePath).then ((response ) => {
172172 this .insertAttachment (
173173 response .data ? .name , response .data ? .id , response .data ? .mimetype ,
174174 null , response .data ? .dirname ,
@@ -182,7 +182,7 @@ export default {
182182 },
183183 createAttachment (template ) {
184184 this .state .isUploadingAttachments = true
185- return this .syncService ? .createAttachment (template).then ((response ) => {
185+ return this .syncService .createAttachment (template).then ((response ) => {
186186 this .insertAttachmentPreview (response .data ? .id )
187187 }).catch ((error ) => {
188188 logger .error (' Failed to create attachment' , { error })
0 commit comments