Skip to content

Commit

Permalink
fix(angular2-cookie-law.service): Set banner initial state to hidden
Browse files Browse the repository at this point in the history
When transferring state from SSR to browser users who have seen the notice would be flashed briefly
with the notice before browser hides it based on the cookie.
  • Loading branch information
andreasonny83 committed Feb 3, 2019
1 parent 55a9f6f commit 7002867
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export class Angular2CookieLawService {

if (isPlatformBrowser(this.platform)) {
cookies = this.doc.cookie.split(';');
} else {
return true;

return this.cookieExisits(cookieName, cookies);
}

return this.cookieExisits(cookieName, cookies);
return true;
}

public storeCookie(cookieName: string, expiration?: number): void {
Expand Down

0 comments on commit 7002867

Please sign in to comment.