Skip to content

Commit 51968f9

Browse files
committedOct 2, 2024··
Skip isNaN
1 parent 9e7ca51 commit 51968f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function parse(str, options) {
100100
// RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
101101
var max = len - 2;
102102
if (max < 0) return obj;
103-
103+
104104
var dec = (options && options.decode) || decode;
105105
var index = 0;
106106
var eqIdx = 0;
@@ -203,7 +203,7 @@ function serialize(name, val, options) {
203203
if (null != opt.maxAge) {
204204
var maxAge = opt.maxAge - 0;
205205

206-
if (isNaN(maxAge) || !isFinite(maxAge)) {
206+
if (!isFinite(maxAge)) {
207207
throw new TypeError('option maxAge is invalid')
208208
}
209209

0 commit comments

Comments
 (0)
Please sign in to comment.