Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable warnings not working #56

Closed
Carlos-err406 opened this issue Oct 11, 2023 · 3 comments
Closed

Disable warnings not working #56

Carlos-err406 opened this issue Oct 11, 2023 · 3 comments
Labels
bug Something isn't working version 2.x

Comments

@Carlos-err406
Copy link

Carlos-err406 commented Oct 11, 2023

i get this logs on every server restart and is getting quite annoying, i tried to use the disableWarnings function but nothing changes.

Unable to find the document.cookies. No data will be persisted.
Are you running on a server? Most of storages are not available while running on a server.      
Unable to find the window.localStorage. No data will be persisted.
Are you running on a server? Most of storages are not available while running on a server.      
Unable to find the window.sessionStorage. No data will be persisted.
Are you running on a server? Most of storages are not available while running on a server.

am i using it wrong?
image

@MacFJA MacFJA added bug Something isn't working version 2.x labels Oct 13, 2023
@MacFJA
Copy link
Owner

MacFJA commented Oct 14, 2023

It's not your fault.

It's bug that have been introduced in version 2.3.0: the new alias functions (persistCookie, persistBrowserSession, persistBrowserLocal and theirs derivate function) use centralized storage. But this storage is created before you can have the chances to call disableWarnings()

I will update the code so those centralized storage are lazy-created

@MacFJA
Copy link
Owner

MacFJA commented Oct 15, 2023

@Carlos-err406 I just publish the version 2.4.1 that fix the issue.

@MacFJA MacFJA closed this as completed Oct 15, 2023
@Carlos-err406
Copy link
Author

looks good to me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working version 2.x
Projects
None yet
Development

No branches or pull requests

2 participants