0👍
✅
You need to check whether the value you have as input is a blob:
selectImage(e) {
const selectedImage = e.target.files[0]; // get image
if (selectedImage instanceof Blob) {
this.createBase64Image(selectedImage);
} else {
//not a blob, cancel/close happened
}
},
and in the else branch you can do some handling for the case when cancel/close occurred
Source:stackexchange.com