mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-11 17:30:37 +01:00
webapp: Fix exception on file upload select
This commit is contained in:
@@ -265,8 +265,9 @@ export default defineComponent({
|
|||||||
const target = this.$refs.file as HTMLInputElement;
|
const target = this.$refs.file as HTMLInputElement;
|
||||||
if (target.files !== null && target.files[0]) {
|
if (target.files !== null && target.files[0]) {
|
||||||
this.file = target.files[0];
|
this.file = target.files[0];
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (!this.file) return;
|
|
||||||
|
|
||||||
// Read the file content
|
// Read the file content
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
|
|||||||
Reference in New Issue
Block a user