I am having trouble adding multiple images and cannot seem to figure out how to make it work.
Here is the method I am using:
imageAdd(e) {
e.forEach(function(e) {
if (e.type == 'image/jpeg' || e.type == 'image/png')
{
this.images.push({
image: URL.createObjectURL(e),
imageData: e
})
}
})
},
Every time I try to push to the images array, I get an error message saying
Cannot read property 'images' of undefined
, even though it has been defined in my data. What could be causing this issue?