Skip to content

Commit 17f613a

Browse files
committed
Update apollo.js
1 parent abf8980 commit 17f613a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/apollo.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default defineNuxtPlugin((nuxtApp) => {
2323
* If session data exist in local storage, set value as session header.
2424
*/
2525

26-
if (process.client && cookie.value) {
26+
if (cookie.value) {
2727
operation.setContext(() => ({
2828
headers: {
2929
"woocommerce-session": `Session ${cookie.value}`,
@@ -45,9 +45,9 @@ export default defineNuxtPlugin((nuxtApp) => {
4545
response: { headers },
4646
} = context;
4747

48-
const session = headers.get("woocommerce-session") || cookie.value;
48+
const session = headers.get("woocommerce-session");
4949

50-
if (process.client && session) {
50+
if (session) {
5151
if (session !== cookie.value) {
5252
cookie.value = session;
5353
}

0 commit comments

Comments
 (0)