Skip to content

Commit

Permalink
fix: fix the way of verifying the response file disponibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dependentmadani committed Jul 30, 2024
1 parent 30f13f9 commit f4b8bc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export default class ImageTool implements BlockTool {
* @param response - uploading server response
*/
private onUpload(response: UploadResponseFormat): void {
if (response.success && response.file.url) {
if (response.success && Boolean(response.file)) {
this.image = response.file;
} else {
this.uploadingFailed('incorrect response: ' + JSON.stringify(response));
Expand Down

0 comments on commit f4b8bc6

Please sign in to comment.