Skip to content

Commit

Permalink
Handle undefined cookies better
Browse files Browse the repository at this point in the history
  • Loading branch information
DispatchCommit committed Mar 31, 2021
1 parent 57838b0 commit 6da3f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export const actions = {
}

// cookie for global chat hydration flag
const bwGlobal = cookies._bw_global;
const bwGlobal = cookies?._bw_global ?? undefined;
if ( bwGlobal !== undefined ) {
commit( `${Chat.namespace}/${Chat.$mutations.setGlobalSSR}`, bwGlobal );
}
Expand Down

0 comments on commit 6da3f93

Please sign in to comment.