Skip to content

Commit d690b99

Browse files
author
Dmytro Shyrokonis
committed
[Fix] Add reject for nil result url
1 parent 99908f9 commit d690b99

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)