diff --git a/sharedComponents/cookie-law/cookie-law.component.ts b/sharedComponents/cookie-law/cookie-law.component.ts index b7dc060a..bb2a08bd 100644 --- a/sharedComponents/cookie-law/cookie-law.component.ts +++ b/sharedComponents/cookie-law/cookie-law.component.ts @@ -109,10 +109,11 @@ export class CookieLawComponent implements OnInit { this.isSeenEvt = new EventEmitter(); this.animation = 'topIn'; this._position = 'bottom'; - this.cookieLawSeen = this._service.seen(this.cookieName); + } ngOnInit(): void { + this.cookieLawSeen = this._service.seen(this.cookieName); if (typeof document !== 'undefined') { this.animation = this.position === 'bottom' ? 'bottomIn' : 'topIn'; diff --git a/sharedComponents/cookie-law/cookie-law.service.ts b/sharedComponents/cookie-law/cookie-law.service.ts index a0819074..dd497d7d 100644 --- a/sharedComponents/cookie-law/cookie-law.service.ts +++ b/sharedComponents/cookie-law/cookie-law.service.ts @@ -17,7 +17,7 @@ export class CookieLawService { } storeCookie(cookieName): void { - return this.setCookie('cookieName'); + return this.setCookie(cookieName); } /**