Fixed issue with image preview.

This commit is contained in:
2019-02-21 21:11:14 +01:00
parent 49dac7d26d
commit 82a53ed9aa
7 changed files with 7 additions and 7 deletions

View File

@@ -36,7 +36,7 @@ export default {
processFiles(event) {
const files = event.target.files;
let mappedFiles = []
let album = this.files;
let album = this.files || [];
// Files is a object with index keys so we need to map to a list
for (var i = files.length - 1; i >= 0; i--) {
@@ -47,7 +47,7 @@ export default {
}
mappedFiles.reverse();
album = [...album, ...files]
album = album.concat(mappedFiles)
console.log('Packed uploaded album:', album)
this.setPopoverAlbum(album)