Skip to content

Commit

Permalink
fix: allow empty options in browser in httpOnly check
Browse files Browse the repository at this point in the history
  • Loading branch information
maticzav committed Apr 1, 2020
1 parent 48b3957 commit f805c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}

Expand Down

0 comments on commit f805c28

Please sign in to comment.