Skip to content

Commit 8785e50

Browse files
committed
Set state._savedCookieContent.lastConsentTimestamp even if cookie state is unchanged
Fixes #702
1 parent 6e7c553 commit 8785e50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils/cookies.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ export const saveCookiePreferences = () => {
168168
consentId: state._consentId,
169169
services: deepCopy(state._acceptedServices)
170170
};
171+
172+
if (state._lastConsentTimestamp) {
173+
state._savedCookieContent.lastConsentTimestamp = state._lastConsentTimestamp.toISOString();
174+
}
171175

172176
let isFirstConsent = false;
173177
const stateChanged = categoriesWereChanged || servicesWereChanged;

0 commit comments

Comments
 (0)