doc.getMap() get an empty object at first

hi everyone, i get an empty object using doc.getMap() but in fact it is not suppossed to be empty and it reurn the right value after a while .

i found this by
window.ymapUser = window.doc.getMap(‘userList’);
console.log(JSON.stringify(window.ymapUser));

does anyone encounter the same problem?

Maybe it starts empty before it syncs. Depends a lot on what providers you have it connected to.

Also, use ymapUser.toJSON() when debugging. I really doubt that JSON.stringify can handle Y.Map instances.