1👍
The problem is that you are trying to use document
in the created
handler of the component which is far too early in its life-cycle.
Instead, one approach is to use a watch handler in your UserModal like this:
watch: {
document: function () {
console.log(this.document);
if (this.document) {
this.fetchUsers(this.document);
}
}
}
- [Vuejs]-Make Vue not throw error if component is not defined
- [Vuejs]-AWS Websocket Connection response
Source:stackexchange.com