diff --git a/src/index.ts b/src/index.ts index 5b52ff85..55f5743f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -133,7 +133,7 @@ export function setCookie( } if (isBrowser()) { - if (options.httpOnly) { + if (options && options.httpOnly) { throw new Error("Can not set a httpOnly cookie in the browser.") }