Greetings friends, I was reviewing some of the functions and I wanted to see what data WAPI.getMe() brings me. But it shows me an error.
Cannot read property 'all' of undefined
I have reviewed the function a bit and solving it was not quite simple. I'll leave the solution here for you to review and test yourself. I thought about simplifying it a bit but this way it is better so that it looks very similar to the previous one.
window.WAPI.getMe = function (done) {
const rawMe = window.Store.Contact.get(window.Store.Conn.wid._serialized);
if (done !== undefined) done(rawMe);
return rawMe;
};
Greetings friends, I was reviewing some of the functions and I wanted to see what data
WAPI.getMe()
brings me. But it shows me an error.Cannot read property 'all' of undefined
I have reviewed the function a bit and solving it was not quite simple. I'll leave the solution here for you to review and test yourself. I thought about simplifying it a bit but this way it is better so that it looks very similar to the previous one.
it would finally look something like this