You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling setCookieData() should update the cookie data field without removing the lastConsentTimestamp from the cookie.
Current Behavior
There are some rare circumstances where calling the setCookieData() method causes the lastConsentTimestamp field on the cookie to be lost. Only happens if it's called when the state is otherwise unchanged as state._savedCookieContent.lastConsentTimestamp is only set in the saveCookiePreferences() method if the state has changes or the current consent is invalid.
Expected Behavior
Calling setCookieData() should update the cookie data field without removing the lastConsentTimestamp from the cookie.
Current Behavior
There are some rare circumstances where calling the setCookieData() method causes the lastConsentTimestamp field on the cookie to be lost. Only happens if it's called when the state is otherwise unchanged as state._savedCookieContent.lastConsentTimestamp is only set in the saveCookiePreferences() method if the state has changes or the current consent is invalid.
Steps to reproduce
See this codesandbox for a minimal repro https://codesandbox.io/p/sandbox/cookieconsent1-8jyvgt?file=%2Findex.js (seems to work better with cookies than StackBlitz)
It's a bit a of a contrived example but I think demonstrates the issue without having to involve iframemanager like my real world use case.
Proposed fix or additional info.
See PR: #701
Version
3.0.1
On which browser do you see the issue?
Chrome
The text was updated successfully, but these errors were encountered: