Forked from joduplessis/cookie-typescript-utils.ts
Last active
October 6, 2020 17:02
-
-
Save Andromelus/4a6063edd927c59351b43fa1b3f57b94 to your computer and use it in GitHub Desktop.
Setting, deleting and retrieving cookies in Typescript.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try adding a return after the if block to cover that case.
if (parts.length === 2) {
...return the good stuff....
}
return undefined; // or null or empty string or whatever you think is appropriate