wixMember not working after initial login until refresh

Hey @marlowe-shaeffer I just checked, and it still is not working. I see everyone else posting workarounds, so hopefully this isn’t redundant info, but just to explain the original problem.

Once a member logs into the site, I am unable to access “currentMember” object on any page until a hard refresh. Quick code example:

import { currentMember } from ‘wix-members’ ;

$w . onReady ( async function (){
let member = await currentMember . getMember ({ fieldsets : [ ‘FULL’ ]})
console . log ( member )
})

No matter which page this is added on, member is always returning as undefined until a hard refresh. Steps to reproduce:

  1. Add the above code snippet to any random page

  2. Log out of site

  3. Log into the site

  4. Navigate to page with this code snippet

  5. You will see the log show ‘undefined’

  6. Refresh the page

  7. Now you should see the member object

Please advise. I want to reiterate that my site is not broken, I am using the deprecated wix-users module for this stuff for now. But it would be nice to move to the new module!