[Vuejs]-Get vue object inside object into console

1👍

The first thing I notice is that exif doesn’t have the ... that all the other properties have. This suggests that it doesn’t have a property getter. As reactive properties all have getters it would suggest that this property was added later than the others without using Vue.set.

With that in mind it is worth noting that objects logged to the console are live. If you hover over the little blue i icon you’ll get some indication of this. The console does not take a copy of the properties when you log an object. It will only grab the property values when you expand the object in the console.

So what I believe is happening is that the property exif does not exist at the point you are logging out the object but it is subsequently added before you click on the object in the console.

There are other things you can try logging to double check. e.g. console.log(JSON.stringify(file)) or console.log(Object.keys(file)). These should all confirm that the exif property does not exist at that point.

Leave a comment