V
V
vlad17532021-08-16 16:46:43
Node.js
vlad1753, 2021-08-16 16:46:43

How to deal with Proxy in JavaScript?

An asynchronous request receives the following data from the server:
[Proxy, Proxy, Proxy, Proxy]
Why Proxy?
Why not ordinary objects?
How to fix it?

PS REST API application on MEVN stack. I am using axios.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey P, 2021-08-16
@ruddy22

it is likely that some property in the bean has a different data type than that returned from axios.
For example:

...
 data(){
    return {
       orders : {},
    }  
  },
...

and should be:
...
 data(){
    return {
       orders : null,
    }  
  },
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question