Skip to content

Commit

Permalink
Release 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
eXon committed Nov 6, 2015
1 parent 0d69b7c commit fec737d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions dist/react-cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,19 @@ function save(name, val, opt) {
function remove(name, opt) {
delete _rawCookie[name];

if (typeof document !== 'undefined') {
if (typeof opt === 'undefined') {
opt = {};
} else if (typeof opt === 'string') {
// Will be deprecated in future versions
opt = { path: opt };
}
if (typeof opt === 'undefined') {
opt = {};
} else if (typeof opt === 'string') {
// Will be deprecated in future versions
opt = { path: opt };
}

if (typeof document !== 'undefined') {
opt.expires = new Date(1970, 1, 1, 0, 0, 1);

document.cookie = cookie.serialize(name, '', opt);
}

if (_res && _res.clearCookie) {
var opt = path ? { path: path } : undefined;
_res.clearCookie(name, opt);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/react-cookie.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-cookie",
"version": "0.4.1",
"version": "0.4.2",
"description": "Load and save cookies within your React application",
"main": "index.js",
"files": [
Expand Down

0 comments on commit fec737d

Please sign in to comment.