Skip to content

Commit ab25523

Browse files
committed
Merge pull request js-cookie#79 from FagnerMartinsBrack/patch-1
== null checks for null and undefined
2 parents e60f7e8 + 4bda5f0 commit ab25523

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎jquery.cookie.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
$.cookie = function(key, value, options) {
1212

1313
// key and at least value given, set cookie...
14-
if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
14+
if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value == null)) {
1515
options = $.extend({}, $.cookie.defaults, options);
1616

17-
if (value === null || value === undefined) {
17+
if (value == null) {
1818
options.expires = -1;
1919
}
2020

0 commit comments

Comments
 (0)