Skip to content

Commit ba53f9f

Browse files
authored
Merge pull request #47 from Shyrokonis/main
Add check to prevent GET request for non-existent image after upload
2 parents 99908f9 + d690b99 commit ba53f9f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/assets/javascripts/activeadmin/quill_editor_input.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
method: 'POST'
7474
}).then(response => response.json())
7575
.then(result => {
76+
if (!result.url) {
77+
reject('Upload failed')
78+
}
7679
resolve(result.url);
7780
})
7881
.catch(error => {

0 commit comments

Comments
 (0)